mirror of
https://github.com/kongyuebin1/dongfeng-pay.git
synced 2025-11-05 22:27:33 +08:00
提交新项目
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
module('Inline', {
|
||||
setup: function(){
|
||||
this.component = $('<div data-date="12-02-2012"></div>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.datetimepicker({format: "dd-mm-yyyy"});
|
||||
this.dp = this.component.data('datetimepicker')
|
||||
this.picker = this.dp.picker;
|
||||
},
|
||||
teardown: function(){
|
||||
this.picker.remove();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
test('Picker gets date/viewDate from data-date attr', function(){
|
||||
datesEqual(this.dp.date, UTCDate(2012, 1, 12));
|
||||
datesEqual(this.dp.viewDate, UTCDate(2012, 1, 12));
|
||||
});
|
||||
|
||||
|
||||
test('Visible after init', function(){
|
||||
ok(this.picker.is(':visible'));
|
||||
});
|
||||
|
||||
test('update', function(){
|
||||
this.dp.update('13-03-2012')
|
||||
datesEqual(this.dp.date, UTCDate(2012, 2, 13));
|
||||
});
|
||||
Reference in New Issue
Block a user