|
@@ -5416,11 +5416,11 @@ window.pinyin_dict_notone = {
|
|
|
function date(selector) {
|
|
|
return dateComp.call(this, selector)
|
|
|
}
|
|
|
- date.prototype.init = function() {
|
|
|
- dateCompInit.call(this, {
|
|
|
+ date.prototype.init = function(option) {
|
|
|
+ dateCompInit.call(this, $.extend(true, {
|
|
|
type: "date",
|
|
|
format: "yyyy-MM-dd"
|
|
|
- })
|
|
|
+ }, option))
|
|
|
}
|
|
|
;
|
|
|
z.ui.datetime = function(selector) {
|
|
@@ -5440,11 +5440,11 @@ window.pinyin_dict_notone = {
|
|
|
function datetime(selector) {
|
|
|
return dateComp.call(this, selector)
|
|
|
}
|
|
|
- datetime.prototype.init = function() {
|
|
|
- dateCompInit.call(this, {
|
|
|
+ datetime.prototype.init = function(option) {
|
|
|
+ dateCompInit.call(this, $.extend(true, {
|
|
|
type: "datetime",
|
|
|
format: "yyyy-MM-dd HH:mm:ss"
|
|
|
- })
|
|
|
+ }, option));
|
|
|
}
|
|
|
;
|
|
|
z.ui.time = function(selector) {
|
|
@@ -5465,10 +5465,10 @@ window.pinyin_dict_notone = {
|
|
|
return dateComp.call(this, selector)
|
|
|
}
|
|
|
time.prototype.init = function(option) {
|
|
|
- dateCompInit.call(this, {
|
|
|
+ dateCompInit.call(this, $.extend(true, {
|
|
|
type: "time",
|
|
|
format: "HH:mm:ss"
|
|
|
- })
|
|
|
+ }, option))
|
|
|
}
|
|
|
;
|
|
|
function dateComp(selector) {
|
|
@@ -5515,9 +5515,11 @@ window.pinyin_dict_notone = {
|
|
|
}
|
|
|
}
|
|
|
_this.elem.value = result.value;
|
|
|
- opt.done(result.value)
|
|
|
+ opt.onSuccess && opt.onSuccess(result.value)
|
|
|
},
|
|
|
- onFail: function(err) {}
|
|
|
+ onFail: function(err) {
|
|
|
+ opt.onFail && opt.onFail(err)
|
|
|
+ }
|
|
|
})
|
|
|
});
|
|
|
return
|