tests for datetimefield

This commit is contained in:
vitalets
2013-04-02 13:36:18 +04:00
parent b0684d0174
commit 2778630c7b
5 changed files with 17 additions and 7 deletions

@ -80,7 +80,11 @@ $(function(){
value2html: function(value, element) {
//formatDate works with UTCDate!
var text = value ? this.dpg.formatDate(this.toUTC(value), this.parsedViewFormat, this.options.datetimepicker.language, this.options.formatType) : '';
DateTime.superclass.value2html(text, element);
if(element) {
DateTime.superclass.value2html(text, element);
} else {
return text;
}
},
html2value: function(html) {

@ -34,10 +34,10 @@ Automatically shown in inline mode.
}, this));
},
value2input: function(value) {
this.$input.val(value ? this.dpg.formatDate(value, this.parsedViewFormat, this.options.datepicker.language) : '');
this.$tpl.datepicker('update');
this.$input.val(this.value2html(value));
this.$tpl.datetimepicker('update');
},
input2value: function() {
@ -62,7 +62,7 @@ Automatically shown in inline mode.
@property inputclass
@default 'input-small'
**/
inputclass: 'input-small',
inputclass: 'input-medium',
/* datetimepicker config */
datetimepicker:{