Ajax switching between CalendarDateTimePicker and CalendarDatePicker

1 view
Skip to first unread message

chiangf

unread,
Nov 20, 2006, 10:27:48 AM11/20/06
to TurboGears
In one of my forms, I have a CalendarDateTimePicker form, and I have a
checkbox "All Day", which I want to use to remove the Time portion from
the form.

Is there any way of doing this? What I tried to do is as follows:
My checkbox onclick would call a javascript function that called the
Calendar.setup, and changed show_time to False and removing the time
from the textbox value.

This actually worked somewhat, but then when I tried to use the
Calendar to make another selection of date, the changes did not show up
in the textbox. It was almost as if I had disconnected the two. Not
sure how though.

I know that I can reload the page and just use CalendarDate rather than
CalendarDateTime, but I'd rather do it on the client side.

By the way... I noticed a weird behavior with the
CalendarDateTimePicker. If I shift-click the time boxes a few times,
they disappear? Bug?


Frank

Reply all
Reply to author
Forward
0 new messages