Open GoogleCodeExporter opened 9 years ago
Hi,
I second this. I just started using and setting up my calendar_date_select and
noticed this as well. For a european
this AM/PM stuff is only confusing.
erik
Original comment by erik.sp...@gmail.com
on 5 Dec 2009 at 9:54
Hi,
version 1.15 btw, been coding away:
added a new option to the options list (line 79):
// initialize the date control
this.options = $H({
embedded: false,
popup: nil,
time: false,
buttons: true,
clear_button: true,
year_range: 10,
close_on_click: nil,
minute_interval: 5,
popup_by: this.target_element,
month_year: "dropdowns",
onchange: this.target_element.onchange,
valid_date_check: nil,
time_12hr: true
}).merge(options || {});
and added the option to the hr/min select creation (around line 198):
var t = new Date();
if (this.options.get("time_12hr")) {
this.hour_select = new SelectBox(buttons_div,
blank_time.concat($R(0,23).map(function(x) {t.setHours(x); return $A([t.getAMPMHour()+ " " +
t.getAMPM(),x])} )),
{
calendar_date_select: this,
onchange: function() { this.calendar_date_select.updateSelectedDate( { hour: this.value });},
className: "hour"
}
);
} else {
this.hour_select = new SelectBox(buttons_div,
blank_time.concat($R(0,23).map(function(x) {t.setHours(x); return $A([t.getHours(),x])} )),
{
calendar_date_select: this,
onchange: function() { this.calendar_date_select.updateSelectedDate( { hour: this.value });},
className: "hour"
}
);
}
Maybe you can get this in a next version, in an optimized form perhaps ;-)
Original comment by erik.sp...@gmail.com
on 5 Dec 2009 at 10:28
Original issue reported on code.google.com by
Arturs.J...@gmail.com
on 12 Mar 2009 at 3:16