Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Calendar tests: Fix dateFormat option test
Do not use value option to pass in a string but value method.
  • Loading branch information
fnagel committed Mar 24, 2015
commit d9ee3a1ec4e03a46de86adf4db6ce8cd95d88247
9 changes: 4 additions & 5 deletions tests/unit/calendar/calendar_options.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,11 @@ test( "buttons - advanced", function() {

test( "dateFormat", function() {
expect( 2 );
var element = $( "#calendar" ).calendar({
value: "1/1/14"
}),
firstDayLink = element.calendar( "widget" ).find( "td[id]:first button" );
var element = $( "#calendar" ).calendar();

firstDayLink.trigger( "mousedown" );
element.calendar( "value", "1/1/14" );

element.calendar( "widget" ).find( "td[id]:first button" ).trigger( "mousedown" );
equal( element.calendar( "value" ), "1/1/14", "default formatting" );

element.calendar( "option", "dateFormat", { date: "full" } );
Expand Down