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 / C++ / MFC
  4. CDateTimeCtrl editing short year format

CDateTimeCtrl editing short year format

Scheduled Pinned Locked Moved C / C++ / MFC
question
5 Posts 2 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.
  • B Offline
    B Offline
    baerten
    wrote on last edited by
    #1

    Hi everybody, is there a possibility to edit the year in the short format(yy) aswell? I set the format "dd.MM.yy" and the date is shown correctly as "23.04.15" But if I place the cursor in the year-section, the year switches from 15 to 2015. I need that the year keeps 15 at the edit-mode. Big thanks for any information :) Regards -baerten-

    L 1 Reply Last reply
    0
    • B baerten

      Hi everybody, is there a possibility to edit the year in the short format(yy) aswell? I set the format "dd.MM.yy" and the date is shown correctly as "23.04.15" But if I place the cursor in the year-section, the year switches from 15 to 2015. I need that the year keeps 15 at the edit-mode. Big thanks for any information :) Regards -baerten-

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      What edit mode are you talking about? Where is this value displayed that changes, and how is the change displayed?

      B 1 Reply Last reply
      0
      • L Lost User

        What edit mode are you talking about? Where is this value displayed that changes, and how is the change displayed?

        B Offline
        B Offline
        baerten
        wrote on last edited by
        #3

        Thanks for your reply I call it edit mode if I place simply the cursor into it. Without the focus the control displays 24.04.15 If I place the cursor in the day section of the control it displays 24.04.15 If I place the cursor in the year section of the control it displays 24.04.2015 I use Visual Studio 2013. It has the same behaviour on Windows 7 and 8 Thanks for any information

        L 1 Reply Last reply
        0
        • B baerten

          Thanks for your reply I call it edit mode if I place simply the cursor into it. Without the focus the control displays 24.04.15 If I place the cursor in the day section of the control it displays 24.04.15 If I place the cursor in the year section of the control it displays 24.04.2015 I use Visual Studio 2013. It has the same behaviour on Windows 7 and 8 Thanks for any information

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          So exactly what programming problem are you having?

          B 1 Reply Last reply
          0
          • L Lost User

            So exactly what programming problem are you having?

            B Offline
            B Offline
            baerten
            wrote on last edited by
            #5

            I use the short format of the DateTime Control. So, I want only 2 digits for the year. But if I place the cursor in the year, it becomes 4 digits. Is there a possibility to avoid this? To recreate the OnDraw/OnKey logics is not so rational :sigh:

            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