JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Date & Time Pickers › Date time calendar tab header undefined in italian
Tagged: locale
When I use a date picker and I open the calendar with locale=’it’ I see it but :
How can I solve ?
Tks
Hi,
After you set the locale, you should use the messages property to set the translations of dataTabLabel and timeTabLabel
Please see the example here: DateTimePicker locales
The first day of the week can be changed with the firstDayOfWeek property. You should set it to “1” for Monday.
Best regards, Ivan Peevski
Smart UI Team https://www.htmlelements.com/
Tks for Your help.
In my “environment”, however, I don’t know “a priori” how many datepicker I’ve (it’s a runtime generated html code).
Is there any way to set it once for all ?
I tested Your suggestion but it doesn’t work.
In your demo the date picker is setted “en” and then changed to “it”.
However If you set directly “it” as in
<smart-date-time-picker class=”demoDateTimePickerWide” calendar-button enable-mouse-wheel-action drop-down-position=”center-bottom” spin-buttons spin-buttons-position=”left” locale=”it”></smart-date-time-picker>
You’ll see the value undefined.
Tullio
To set the messages you should set the locale property after settings the messages property, because after setting the locale. Our component searches for messages.
See this sample and see: https://codepen.io/svetoslavb04/pen/YzLGOVM?editors=1010
If you need further help, do not hesitate to contact us!
Best Regards, Svetoslav Borislavov