jQuery datepicker displaying a Buddhist date

允我心安 提交于 2019-12-08 14:40:26

You can find my modified version of jQuery DatePicker here:

http://www.anassirk.com/articles/1

The blog is in Thai so I'll briefly explain it below:

Download the plugin here: http://www.anassirk.com/files/DatePicker.zip

The usage is quite similar to the standard jQuery DatePicker with one extra boolean option named "isBuddhist" which you can set it to true to render the Buddhist calendar.

$("#datepicker-th").datepicker({ dateFormat: 'dd/mm/yy', isBuddhist: true, defaultDate: toDay }); 

important: in Buddhist mode you have to set the "defaultDate" option to a date string of the format specified in the "dateFormat" option. Like '19/3/2554' for 'dd/mm/yy'

Cheers!

sorajate

I've created plugins for jQuery UI datepicker to make it support the Buddhist Era format. More details in jQuery UI datepicker extension for the Buddhist era

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!