Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. DateTimePicker

DateTimePicker

Scheduled Pinned Locked Moved C#
question
9 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Saksida Bojan
    wrote on last edited by
    #1

    Hello, I am using date time picker to display month and a year. How can i make calendar not to show days, only Month and a year?

    B 1 Reply Last reply
    0
    • S Saksida Bojan

      Hello, I am using date time picker to display month and a year. How can i make calendar not to show days, only Month and a year?

      B Offline
      B Offline
      Blue_Boy
      wrote on last edited by
      #2

      Set the DateTimePicker's properties : Format: Custom CustomFormat: MM.yyyy


      I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com

      S 1 Reply Last reply
      0
      • B Blue_Boy

        Set the DateTimePicker's properties : Format: Custom CustomFormat: MM.yyyy


        I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com

        S Offline
        S Offline
        Saksida Bojan
        wrote on last edited by
        #3

        You have missunderstood me, It does display as i want, but when i bring up calendar, there I can see days, but i do not wan't it to be seen

        B 1 Reply Last reply
        0
        • S Saksida Bojan

          You have missunderstood me, It does display as i want, but when i bring up calendar, there I can see days, but i do not wan't it to be seen

          B Offline
          B Offline
          Blue_Boy
          wrote on last edited by
          #4

          Well, in Load event write code to format your DateTimePicker.

          dateTimePicker1.CustomFormat = "MM.yyyy";
          dateTimePicker1.Format = DateTimePickerFormat.Custom;

          I hope I have understood you now!


          I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com

          S 1 Reply Last reply
          0
          • B Blue_Boy

            Well, in Load event write code to format your DateTimePicker.

            dateTimePicker1.CustomFormat = "MM.yyyy";
            dateTimePicker1.Format = DateTimePickerFormat.Custom;

            I hope I have understood you now!


            I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com

            S Offline
            S Offline
            Saksida Bojan
            wrote on last edited by
            #5

            Blue_Boy wrote:

            I hope I have understood you now!

            Nice try, but not. I will let the screenshot talking http://i26.photobucket.com/albums/c104/bsaksida/Pic.png[^]

            B 1 Reply Last reply
            0
            • S Saksida Bojan

              Blue_Boy wrote:

              I hope I have understood you now!

              Nice try, but not. I will let the screenshot talking http://i26.photobucket.com/albums/c104/bsaksida/Pic.png[^]

              B Offline
              B Offline
              Blue_Boy
              wrote on last edited by
              #6

              Hi, Will be solution for you if you set property ShowUpDown=true of dateTimePicker ?


              I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com

              S 1 Reply Last reply
              0
              • B Blue_Boy

                Hi, Will be solution for you if you set property ShowUpDown=true of dateTimePicker ?


                I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com

                S Offline
                S Offline
                Saksida Bojan
                wrote on last edited by
                #7

                Not exactly what i had in mind, but it is still better. Maybe i woud need to look for custom control

                J 1 Reply Last reply
                0
                • S Saksida Bojan

                  Not exactly what i had in mind, but it is still better. Maybe i woud need to look for custom control

                  J Offline
                  J Offline
                  J 0
                  wrote on last edited by
                  #8

                  Why not create your own user control with 2 comboboxes on it? The first combobox will have the months, the 2nd will have the year values.

                  S 1 Reply Last reply
                  0
                  • J J 0

                    Why not create your own user control with 2 comboboxes on it? The first combobox will have the months, the 2nd will have the year values.

                    S Offline
                    S Offline
                    Saksida Bojan
                    wrote on last edited by
                    #9

                    The only thing i have ask is if I can modify calendar that pops up after clicking on the DateTimePicker. I Wanted that callendar to display Month instead days. If you click the month, callendar would "zoom out". I wanted that view for that callendar

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups