How to localize the Date Range Picker?

3.2k Views Asked by At

enter image description here

I'm using date range picker component for choosing date ranges. Does it support I18n? How can I edit the calendar language into Traditional Chinese?

Here is an example snippet of configuration code:

// Set the date range picker
$('input[name="daterange-last-30-days"]').daterangepicker({

    // Predefined Ranges
    startDate: moment().subtract('days', 30),
    endDate: moment(),
    "applyClass": "btn-success",
    "cancelClass": "btn-danger",
    locale: {
        format: 'YYYY/MM/DD',
        // Language Setting
        monthNames: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
        daysShort: ["日", "一", "二", "三", "四", "五", "六"]
    }
});

Any advice or guidance would be greatly appreciated.

1

There are 1 best solutions below

4
On BEST ANSWER

you can use this jquery plugin for chinese language support with date range picker.

check that link if it helps...