我想你出現錯誤的原因是,您爲當前日期添加543年而設置的年份在日曆中不可用 請發佈完整代碼以便檢查 首先嚐試將日曆模式更改爲泰文
由於泰國日曆一樣佛曆 https://en.wikipedia.org/wiki/Thai_solar_calendar
注:所以你需要使用日曆控件這個泰國日曆選項是不是在日期選擇器可用。
http://keith-wood.name/calendars.html
這裏是樣品
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>jQuery Calendars Datepicker</title>
<link rel="stylesheet" href="jquery.calendars.picker.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="jquery.plugin.js"></script>
<!--<script src="jquery.calendars.all.js"></script><!-- Use instead of calendars, plus, and picker below -->
<script src="jquery.calendars.js"></script>
<script src="jquery.calendars.plus.js"></script>
<script src="jquery.calendars.picker.js"></script>
<!--<script src="jquery.calendars.picker.ext.js"></script><!-- Include for ThemeRoller styling -->
<script src="jquery.calendars.thai.js"></script>
<script>
$(function() {
// $.calendars.picker.setDefaults({renderer: $.calendars.picker.themeRollerRenderer}); // Requires jquery.calendars.picker.ext.js
var calendar = $.calendars.instance('thai');
$('#inlineDatepicker').calendarsPicker({calendar: calendar, onSelect: showDate});
});
function showDate(date) {
alert('The date chosen is ' + date);
}
</script>
</head>
<body>
<div id="inlineDatepicker"></div>
</body>
</html>
calendarpicker不是我的網站監守我用jQuery的版本2.0.2,但calendarpicker使用1.11,但日期選擇器可以使用的jQuery 2.0.2 – iwebsmile
使用如何在基思木日期選擇器使用日曆泰? – tarzanbappa
我下載了keith-wood datepicker和日曆選取器。他們都在使用jQuery 1.11 – tarzanbappa