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

    Date chooser possibility showing 12 & 24 hour format

    As shown in the attachment, is there any way I can change the top black circle date format? I know I can use use24HourTime to set the bottom green circle format, and show am/pm. But is there anyway I can change the top black circle date format, show 12 hour format and am/pm.

    And also, is that possible to show time zone information in the green box? That allows user to select timezone drop down.
    Attached Files
    Last edited by michaelqiji; 10 Aug 2020, 10:23.

    You should find that it responds to the system-wide setting Time.use24HourTime.


      Thanks, that solves my first question. My second question is that is there an option to show time zone drop down in date chooser bottom green box?


        There is a DateChooser.timeItem AutoChild that you could customize, but JavaScript dates do not store timezone information (all dates are simply in the current timezone), so it's not clear what behavior such a drop-down would have.

        At most, you could build a customized interface to allow the user to input timezone information, then you could translate that into a stored timestamp value. But if you wanted to keep track of the entered timezone, for example in order to later format in a timezone-specific way, then you would need to store the timezone separately from the timestamp. This is probably best done as a custom SimpleType with a corresponding custom editing interface, and while it's all quite achievable, it's more than we can explain on the forums. Consider our services offerings if you need help with this: either Feature Sponsorship if you would like to see timezone support integrated as a core framework feature, or just consulting if you want to be given an implementation plan and perhaps sample implementation.