Forums

Calendar Field - Days and Months are switching after input

ingenium 24 Oct, 2023
Hello,

I just stumbled across an issue with the calendar field. Unfortunately it will switch the value for day and month if you an input by keyboard where DD <= 12.

Display Format AND Real Format is set to DD.MM.YYYY. If you write your date with the keyboard for example 02.10.2023 (DD.MM.YYYY) it will change it to 10.02.2023 (DD.MM.YYYY) in the field, when you click outside of the field. If you write a date where the day is over 12 f.e. 22.10.2023 it won't change it. If you use the datepicker it works correctly.

Thanks for your help and best regards.
Max_admin 24 Oct, 2023
Answer
yes, you need to set the field to "readonly" using the HTML attributes setting, that should prevent keyboard input
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
ingenium 25 Oct, 2023
Hello Max,

thanks for your reply.

I don't want to prevent keyboard input, because I think most users are faster and it's easier to use the keyboard. Is there a way to ensure, that Days and Months are saved correctly?

Best regards
Max_admin 25 Oct, 2023
you may use a normal text field with a "Field mask" then
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
ingenium 25 Oct, 2023
1 Likes
Thanks Max,

I didn't knew there was already this "date masks" implemented for text fields. I think I'm going with that option.

Have a nice day, best regards
You need to login to be able to post a reply.