jQuery: The Write Less, Do More JavaScript Library

Multiple selection datepicker

View: New views
2 Messages — Rating Filter:   Alert me  

Multiple selection datepicker

by Daniele Grillenzoni :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I'm toying with the datepicker thing here, and I'm wondering how hard
would it be to extend it so that clicking a value does NOT close the
datepicker, but adds the selected date to an array of dates
(serialized by the dateFormat in the linked control, maybe separated
by a configurable separator). Of course this multiselection is
optional, an option setting like multipleDates, with
multipleDateSeparator...

Also, I'm working for a website of an event who lasts ~4 weeks a year,
and all the dates are shown as "D d/m" but the datepicker isn't so
happy about date formats without a year, it would be nice to be able
to define a default year value (with the optional values "none" and
"current", "none" as default) which completes the date.

Also, the D/DD values are not things that the user is accustomed to
input, the parsing function should be extended so that(where possible)
that piece of the string is optional (a user can forego it and the
date should still be "edible"), while still filled when it's the
datepicker that returns the value.

I'm willing to make these changes myself and committing them to the
svn (or sending them to who manages the code), but I'm gonna need some
help:
1. There actually is a lot of code, and I don't have time to study it
all, I need some tip on where to look.
2. I need to know if these features are welcome or not
3. I need to understand if the changes are just trivial edits (I'm
guessing 15/20 more lines of code) or if I'm facing a gargantuan task.

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


Re: Multiple selection datepicker

by Daniele Grillenzoni :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I'm hacking the code right now, I managed to implement a staticYear
property for yearless date formats, but browsing to the code i found
this function:

        /* Set the dates for a jQuery selection.
           @param  target   element - the target input field or division or
span
           @param  date     Date - the new date
           @param  endDate  Date - the new end date for a range (optional) */
        _setDateDatepicker: function(target, date, endDate) {
                var inst = $.data(target, PROP_NAME);
                if (inst) {
                        this._setDate(inst, date, endDate);
                        this._updateDatepicker(inst);
                }
        },

Despite various attempts, I never managed to make it fire, and there
it's never mentioned elsewhere in the file... anyone could tell me
what is it for?

On Jul 22, 12:15 pm, Madness <daniel...@...> wrote:

> I'm toying with the datepicker thing here, and I'm wondering how hard
> would it be to extend it so that clicking a value does NOT close the
> datepicker, but adds the selected date to an array of dates
> (serialized by the dateFormat in the linked control, maybe separated
> by a configurable separator). Of course this multiselection is
> optional, an option setting like multipleDates, with
> multipleDateSeparator...
>
> Also, I'm working for a website of an event who lasts ~4 weeks a year,
> and all the dates are shown as "D d/m" but the datepicker isn't so
> happy about date formats without a year, it would be nice to be able
> to define a default year value (with the optional values "none" and
> "current", "none" as default) which completes the date.
>
> Also, the D/DD values are not things that the user is accustomed to
> input, the parsing function should be extended so that(where possible)
> that piece of the string is optional (a user can forego it and the
> date should still be "edible"), while still filled when it's the
> datepicker that returns the value.
>
> I'm willing to make these changes myself and committing them to the
> svn (or sending them to who manages the code), but I'm gonna need some
> help:
> 1. There actually is a lot of code, and I don't have time to study it
> all, I need some tip on where to look.
> 2. I need to know if these features are welcome or not
> 3. I need to understand if the changes are just trivial edits (I'm
> guessing 15/20 more lines of code) or if I'm facing a gargantuan task.

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

LightInTheBox - Buy quality products at wholesale price