Re: JSCalendar in AJAX Page
2008/10/04 14:46
Viewed 2857 times
Replies: 1/3

I also hv the same problem, and i find a way to get around this.

Simple trick... use onclick=" Calendar.setup(.." instead of using script tag at yr ajax response page <script type="text/javascript"> Calendar.setup(...</script>
I notice there is a side-effect, i need to click twice to pop-up the calendar for the 1st time, after that it's work normal.

for example, do this on yr ajax response page

<input type="text" name="date" id="f_date_b" /><button type="reset" id="f_trigger_b"
onclick="Calendar.setup({
inputField : "f_date_b", //*
ifFormat : "%m/%d/%Y %I:%M %p",
showsTime : true,
button : "f_trigger_b", //*
step : 1
});">...</button>

Google