Pre-selected date
2008/07/27 19:09
Viewed 1118 times
Replies: 1/3

Hi all,

My thanks for this great piece of code!
I wonder if anyone could help with this query? Basically I want to be able to pre select at least one date within an instance of the pop up calendar when it is called by the user and I wondered if anyone out there had any experience on doing this.

The context to this is as follows:
I want the user to be able to edit the dates that are associated with an event record that is stored in my database. This means when calling up details on the event for editing within a form, the current dates attached to this event are also displayed in a text area. When calling up the multiple date enabled calendar in order to change the dates that are currently displayed in this text area, I want the dates displayed to be pre selected in the calendar.
I've been looking through the reference document for the calendar and have noticed a calendar method called parsedate which sets the calendar to a specific date. My thinking is that I need something like this to happen with regards to getting dates in to the multiple property of the calendar but I'm a bit confused as to how to do this! Can anyone give me any pointers?

Larry

Re: Pre-selected date
2008/08/01 00:29
Viewed 1304 times
Replies: 1/2

Try 'date' in Calendar.setup:

Calendar.setup({
displayArea : 'output-flat',
flat : 'calendar-container-flat',
multiple : MA,
flatCallback : myCallback,
date : '<?php echo date("Y/m/d H:i",$row['events_date']);?>', // Get date from db
});

/Barry

last
Re[2]: Pre-selected date
2008/08/09 18:57
Viewed 901 times
Replies: 1/1

Cheers for replying Barry G.

I'd noticed the date parameter in the Calendar documentation but I didn't go down that path. It's great for pre-selecting one date but I want to be able to pre-select more than one date, if the event in question has more than one date. Any idea's on how to achieve this?
As a plan b I decided to implement the 'high-light special dates' feature which is within the calendar docs. At least this way I can high-light multiple dates but its not quite what I'm looking for as the dates aren't themselves selected, they just have a different css class making them appear a different colour.
Any idea's anyone?

Cheers all the same!

last
Google