mirror of https://github.com/layui/laydate
Fix Bug: default time should not set when input have value
parent
4006defad5
commit
6ecb9cdbef
|
@ -169,7 +169,7 @@ Dates.run = function(options){
|
|||
elem = options.elem ? S(options.elem) : target;
|
||||
|
||||
as.elemv = /textarea|input/.test(elem.tagName.toLocaleLowerCase()) ? 'value' : 'innerHTML';
|
||||
if ('init' in options ? options.init : config.init) elem[as.elemv] = laydate.now(null, options.format || config.format);
|
||||
if (('init' in options ? options.init : config.init) && (!elem[as.elemv])) elem[as.elemv] = laydate.now(null, options.format || config.format);
|
||||
|
||||
if(even && target.tagName){
|
||||
if(!elem || elem === Dates.elem){
|
||||
|
|
Loading…
Reference in New Issue