Replies: 6 comments 4 replies
-
Hi @festing , perhaps you can try using the files from CDN: |
Beta Was this translation helpful? Give feedback.
-
Great. that works... NOW how do I change language to english? Documentation method does not work as it seems it's refering to NPM install object. I can get other options to work but NOTHING I try changes to english. |
Beta Was this translation helpful? Give feedback.
-
@festing You can create an locale object before datepicker initialization and use it.
The locale object is a copy from here: https://github.com/t1m0n/air-datepicker/blob/v3/dist/locale/en.js |
Beta Was this translation helpful? Give feedback.
-
Hmmm... seems like there should be a way to somehow link to the existing language JS in script, rather than having to open and then copy/paste. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Rewrote local files and placed them in locales directory in en.js"use strict"; locales.en = void 0; var _default = { days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], daysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], daysMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], months: ['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'], today: 'Today', clear: 'Clear', dateFormat: 'MM/dd/yyyy', timeFormat: 'hh:mm aa', firstDay: 0 }; locales.en = _default; in html<script> var locales = {}; </script> in jsnew AirDatepicker('#air_datepicker', { locale: locales.en }) this way you can have different locales on same page without copy and paste |
Beta Was this translation helpful? Give feedback.
-
on shared server, no access to install via NPM. Downloaded src files. How do I use?
Beta Was this translation helpful? Give feedback.
All reactions