Daemonite / material

Material Design for Bootstrap 4
http://daemonite.github.io/material/
MIT License
3.2k stars 725 forks source link

date pickers -> change the language #251

Closed ImhotepDE closed 4 years ago

ImhotepDE commented 4 years ago

Hello,

can I change the language of the date pickers to for example german?

Thanks for the help

djibe commented 4 years ago

You can try to change these parameters for a custom translation

labelMonthNext: 'Next month', labelMonthPrev: 'Previous month',

      // The title label to use for the dropdown selectors
      labelMonthSelect: 'Select a month',
      labelYearSelect: 'Select a year',

      // Months and weekdays
      monthsFull: [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ],
      monthsShort: [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ],
      weekdaysFull: [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ],
      weekdaysShort: [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ],

      // Today and clear
      today: 'Today',
      clear: 'Clear',
      close: 'Close'

And tell us if you were successful

djibe commented 4 years ago

@ImhotepDE Hi, did it work ?

ImhotepDE commented 4 years ago

Hi, first of all thanks for the quick response. I didn't try any more, I'm sorry.

I now use the DateTime Picker from: https://github.com/T00rk/bootstrap-material-datetimepicker

It has all the necessary functions like time and date.

djibe commented 4 years ago

@ImhotepDE I did a fork for this plugin with updated styles. I'll update it again soon.