Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DateItem prefixing to 19..to 4 digit year

    Hi Support,

    In older version (v11.0p_2019-06-05/Enterprise Deployment) Date Item is prefixing 19 , if user enters the date manually in date field

    e.g If user entes 11/14/25 - It is converting to 11/14/1925 instead of 2025.

    I did not notice this problem latest 14.0. Until we rollout new version, we need to fix it.

    Thanks,
    Revan
    Attached Files

    #2
    How we transform a 2-digit year into a 4-digit year is controlled by DateItem.centuryThreshold - it used to be set to 25, so a number less than 25 would be prefixed 20 and larger numbers would be prefixed 19. It was changed to 25 years from today - so, in this case, [20]49. This means that years 49 and below are prefixed "20" and years 50 and higher are prefixed "19".

    You can change the centuryThreshold globally before any widgets are created, if you want different results - DateItem.addProperties({ centuryThreshold: 25 }), for example.
    Last edited by Isomorphic; 25 Nov 2024, 09:38.

    Comment


      #3
      centuryThreshold fixed the problem.

      Thank you

      Comment

      Working...
      X