Fix Bug: default time should not set when input have value

pull/17/head
Brightcells 2015-09-16 10:31:19 +08:00
parent 4006defad5
commit 6ecb9cdbef
1 changed files with 1 additions and 1 deletions

View File

@ -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){