t1m0n / air-datepicker

Lightweight, dependency-free JavaScript datepicker.
https://air-datepicker.com
MIT License
2.62k stars 1.37k forks source link

I couldn't change language as 'en' nor 'zh' ? #209

Open tsengkiki opened 7 years ago

tsengkiki commented 7 years ago

Hello~ ^^ you did a good job here, I'm a student learning coding for a while, I'd like to use Air-Datepicker in my assignment, I want it change to language 'zh', but in vain, the console area says: _datepicker.min.js:1 Can't find language "zh" in Datepicker.language, will use "ru" instead_ moreover, in my project, I actually did what the document say, as below: _$('#myelement2').datepicker({ language: 'zh' }); $('#myelement2').data('datepicker');_ still, I can't get the right language just I want, please give me a hand, how could I fix it ? thank you

t1m0n commented 7 years ago

Hello! You should also include localization file into page, right after main datepicker's file is included.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="../dist/js/datepicker.js"></script>
<script src="../dist/js/i18n/datepicker.zh.js"></script>
tsengkiki commented 7 years ago

hi~man, I finally get the reason why it didin't work ! you awesome!! thanks for your help ; )