ui.datepicker.js: Possible to both range and single select?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ui.datepicker.js: Possible to both range and single select?

Chris-682

Greetings,
I'm adding persistence behind an 'inline' jQuery datepicker
calendar, and have a couple of questions (being mostly a
noobie to JavaScript, css, jQuery, and ajax).

The goal is an elegant reservation calendar and, after looking
around for a good JavaScript calendar, off and on for a while,
datepicker is the obvious choice. I've got the back-end script
working nicely with ajax requests (to highlight reserved days,
and to disallow overlaps when attempting to create a new entry
that includes one or more reserved days).

I'm trying to figure out how, when 'rangeSelect' is true (to
create a new reservation), to also allow single-select (on a
reserved day to view/edit an existing reservation). When
'rangeSelect' is true, after the 1st click, all of the prior
days become un-selectable and a 2nd click is required.

First question: Is it possible to reset all the prior days to
'selectable' after just one click, when 'rangeSelect' is true?
If so, then second question: How?

If not, then second question: Is ui.datepicker.js designed to
allow simple subclassing? I'm just starting to read about
inheritance in JavaScript. I will need, at least, to override
the _selectDay() function.

If no to both, then looks like I'm stuck either munging around
with ui.datepicker.js, or going back to using a single-select
calendar. But it would sure be nice to 1) use the UI to do a
reset on un-selectable days, or 2) use a nice OO approach.

A screen shot is here, and includes a console log example.
http://villaesmeralda.net/calendar/ve_cal.jpg
Thx,

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery Plugins" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/jquery-plugins?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: ui.datepicker.js: Possible to both range and single select?

Richard D. Worth-2
There is a dedicated mailing list for questions about jQuery UI plugins[*]. You may want to ask there:

http://groups.google.com/group/jquery-ui

- Richard

[*] http://rdworth.org/blog/2008/10/jquery-plugins-and-jquery-ui/

On Mon, Dec 15, 2008 at 10:02 AM, Chris <[hidden email]> wrote:

Greetings,
I'm adding persistence behind an 'inline' jQuery datepicker
calendar, and have a couple of questions (being mostly a
noobie to JavaScript, css, jQuery, and ajax).

The goal is an elegant reservation calendar and, after looking
around for a good JavaScript calendar, off and on for a while,
datepicker is the obvious choice. I've got the back-end script
working nicely with ajax requests (to highlight reserved days,
and to disallow overlaps when attempting to create a new entry
that includes one or more reserved days).

I'm trying to figure out how, when 'rangeSelect' is true (to
create a new reservation), to also allow single-select (on a
reserved day to view/edit an existing reservation). When
'rangeSelect' is true, after the 1st click, all of the prior
days become un-selectable and a 2nd click is required.

First question: Is it possible to reset all the prior days to
'selectable' after just one click, when 'rangeSelect' is true?
If so, then second question: How?

If not, then second question: Is ui.datepicker.js designed to
allow simple subclassing? I'm just starting to read about
inheritance in JavaScript. I will need, at least, to override
the _selectDay() function.

If no to both, then looks like I'm stuck either munging around
with ui.datepicker.js, or going back to using a single-select
calendar. But it would sure be nice to 1) use the UI to do a
reset on un-selectable days, or 2) use a nice OO approach.

A screen shot is here, and includes a console log example.
http://villaesmeralda.net/calendar/ve_cal.jpg
Thx,




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery Plugins" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/jquery-plugins?hl=en
-~----------~----~----~----~------~----~------~--~---