JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums Date & Time Pickers Date time calendar tab header undefined in italian

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #103649

    When I use a date picker and I open the calendar with locale=’it’ I see it but :

    • the header of tabs Date and Time are undefined
    • Sunday is the first day but in Italy is monday (and in all european countries I believe).

    How can I solve ?

    Tks

    #103652
    ivanpeevski
    Participant

    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/

     

    #103653

    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 ?

    Tks

    #103668

    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.

    Tks

    Tullio

    #103678

    Hi,

    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

    Smart UI Team
    https://www.htmlelements.com/

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.