Now that you've explained it more, it makes sense.

I still wouldn't hijack the expected functionality of the date
picker.  You could easily set your date field to the month/year using
the onChangeMonthYear event, but that would be confusing still I
think.  Say a user had selected 9/3/2009 and then decides that he
wants it to be for the whole month of September instead.  It would not
be intuitive to "re-select" the month.  Same for the year.

Here's a couple of ways I can think of:

1) Have radio buttons for: Exact Date, A Month, A Year.  Put a change
event on them so that the proper controls hide/show below them:
(datepicker, month/year selects, year select) respectively.  Then just
figure out the value on submit or put it in a hidden input.

2) Use an inline datepicker and create buttons directly below it that
say something like "This Month" and "This Year". Then if the user
clicks an exact day on the calendar, set your event date field to the
exact date.  If she clicks "This Month" set it to the month and the
same for "This Year"

I like (2) myself.  Less changing and jumping around.

Hth,

Dave



On Sep 3, 2:34 am, "fichtre.diantre" <[email protected]>
wrote:
> @Fontzter
>
> you'r totally right, indeed, but "all I need" is'n't just a year ...
> it's the ability to select
> a day OR just a month OR just a year for the same input field, ex :
> "Date of the event" could be 3/6/2009, or 11/1937 or 1789, it's the user
> choice ...
>
> for the "consistent" part I agree, so no calendar would have another
> action on the year
> and the month "buttons" (either the current date field allow or not a
> fuzzy date). You
> understood, now, that days will allways be clickable as every date field
> allow precise
> dates.
>
> To follow your opinion, do you think, anyway, it would be better to add
> specific buttons
> next to month and year labels?
>
> thank's again for your time,
>
> Fred
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to