https://github.com/eternicode/bootstrap-datepicker
これ使った場合、restした時、困ったので、
とりあえず以下を追加して対応。
$.fn.datepicker.Constructor.prototype.setDefaultValue=function(value){
var formatted = this.getFormattedDate();
if (!this.isInput) {
if (this.component){
this.element.find('input').get(0).defaultValue=formatted;
}
this.element.data('date', formatted);
} else {
this.element.val(formatted);
}
};
0 件のコメント:
コメントを投稿