diff --git a/dist/js/datetimePicker.js b/dist/js/datetimePicker.js index 15cbf65..a6542ce 100644 --- a/dist/js/datetimePicker.js +++ b/dist/js/datetimePicker.js @@ -116,7 +116,12 @@ e.stopPropagation(); e.preventDefault(); _this.element = e.target; - if($(this).attr('value')){ + /* + * fix use input value + * + * 如果使用input button 默认 value是随机的化 这段代码的通用性并不好 + */ + if( $(this).attr('value') !== "请选择" ){ containerVal = $(this).attr('value'); } if(containerVal){ @@ -264,4 +269,4 @@ $.datetimePicker = function(config){ return new DatetimePicker(config); } -})(window.jQuery || $); \ No newline at end of file +})(window.jQuery || $);