[ 2 posts ]

andyEntity

  • Joined: Wed Nov 16, 2011 12:35 pm
  • Posts: 2
  • Offline
  • Profile

CALENDAR: two clicks needed to change interval selection

Post Posted: Wed Nov 16, 2011 12:48 pm
+0-
Hello,

I'm trying to use the YUI2 Calendar (http://developer.yahoo.com/yui/calendar/) to let the user select a date interval. When I set the preselected dates using the 'selected' parameter, they're set just fine, but when the user wants to change the interval, the first click extends the interval to that date. Then they need to click the same date again in order to set it as a starting date of a new interval.

I'm setting the interval using
Code:
var cal = new YAHOO.example.calendar.IntervalCalendar("cal1Container", {pages:2, selected: "11/11/2011-12/12/2011"});


Any idea how to make the calendar start picking new interval on the first click?

Thanks,
Andy

andyEntity

  • Joined: Wed Nov 16, 2011 12:35 pm
  • Posts: 2
  • Offline
  • Profile

Re: CALENDAR: two clicks needed to change interval selection

Post Posted: Wed Nov 16, 2011 1:02 pm
+0-
OK, I found out about the iState http://developer.yahoo.com/yui/examples/calendar/intervalcal.html proprety and fixed it by adding
Code:
cal._iState = 2;
to the selectEvent function.
  [ 2 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum