Browse files

Merge branch 'next'

  • Loading branch information...
2 parents d578157 + b55f6fa commit cbb650e309c961668ef05d7a454ef3b4010e0bb4 @sglee77 sglee77 committed Mar 14, 2010
View
4 js_test/functional/cds_test.html
@@ -221,15 +221,15 @@
cds = new CalendarDateSelect($("cds_test"), {default_time:function() { return new Date('January 02, 2008 2:00 PM') }});
assertEqual('2008', cds.selected_date.getFullYear());
assertEqual('2008', cds.date.getFullYear());
- assert(! cds.selection_made)
+ assert(cds.selection_made)
cds.close();
}},
test_parseDate_defaultTime_javaScriptDatePassed_shouldReturnJavaScriptDate: function() {with(this){
$("cds_test").value = " ";
cds = new CalendarDateSelect($("cds_test"), {default_time:new Date('January 02, 2007 05:45 PM') });
assertEqual('2007', cds.selected_date.getFullYear());
assertEqual('2007', cds.date.getFullYear());
- assert(! cds.selection_made)
+ assert(cds.selection_made)
cds.close();
}},
test_passDivElement__shouldUseChildInputForTargetElement: function() {with(this){
View
2 public/javascripts/calendar_date_select/calendar_date_select.js
@@ -334,7 +334,7 @@ CalendarDateSelect.prototype = {
{
var value = $F(this.target_element).strip()
var default_time = this.options.get("default_time");
- this.selection_made = (value != "");
+ this.selection_made = (value != "" || default_time);
this.date = value=="" ? NaN : Date.parseFormattedString(this.options.get("date") || value);
if (isNaN(this.date) && !default_time)
this.date = new Date();

0 comments on commit cbb650e

Please sign in to comment.