Skip to content

Latest commit

 

History

History
34 lines (31 loc) · 871 Bytes

README.md

File metadata and controls

34 lines (31 loc) · 871 Bytes

bootstrap-datepicker-tw v1.9.0

  • 增加對民國年的支援
  • 使用twy做為民國年的格式化字串, 如twy-mm-dd
  • 引入bootstrap-datepicker.js、bootstrap-datepicker.zh-TW.min.js,用法如下

中文民國年:

var startUpDatePicker = $("#startUpDate").datepicker({
	format: "twy-mm-dd",
	language: "zh-TW",
	showOnFocus: false,
	todayHighlight: true
}).on("show", function (e) {
	$("div.box").css({minHeight: "480px"});
}).on("hide", function (e) {
	$("div.box").css({minHeight: "auto"});
});

英文西元年:

var startUpDatePicker = $("#startUpDate").datepicker({
	format: "yyyy-mm-dd",
	language: "en",
	showOnFocus: false,
	todayHighlight: true
}).on("show", function (e) {
	$("div.box").css({minHeight: "480px"});
}).on("hide", function (e) {
	$("div.box").css({minHeight: "auto"});
});