Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Calendar Datetime format #12068


User avatar
0
Bernard created

Hi,

It seems that the calendar widget is not in current language : $('.startDate').daterangepicker({ autoUpdateInput: false, singleDatePicker: true, locale: abp.localization.currentLanguage.name, format: 'L', })

How can i do that ?

Thks


4 Answer(s)
  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @Bernard,

    I reproduced the problem and I am opening an issue about it. I will share the solution when I find it.

    https://github.com/aspnetzero/aspnet-zero-core/issues/5272

  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @Bernard,

    You can localize buttons as follows. A more useful solution with helper classes and improvements regarding power tools will be added soon.

    $('.date-picker').daterangepicker({
        singleDatePicker: true,
        locale: {
            format: 'L',
            applyLabel: app.localize('Apply'),
            cancelLabel: app.localize('Cancel'),
        },
    }, (start) => $selectedDate.startDate = start);
    
  • User Avatar
    0
    Bernard created

    Hi,

    yes but that does not solve the problem, the translation must be dynamic like the other fields

  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @Bernard,

    It is also localizable for all languages. Do the changes where you use daterangepicker component. Don't forget to run yarn create-bundles command.

    The top picker is the one I solved. The middle one is the incorrect one.