developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 11 years ago

Closed 11 years ago

#905 closed enhancement (fixed)

Managing YearRange in jForms

Reported by: foxmask Owned by: Julien
Priority: normal Milestone: Jelix 1.1.3
Component: jelix:forms Version: 1.1.2
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description

It will be usefull if we could manage the YearRange? of the datepicker in the jForms like the framework does with minDate / maxDate

Actually in the datepicker the yearRange is '-10:+10' so the displayed years in the calendar for people born before 1999 (for example) is not possible ;)

A workarround would be to modify the jquery.ui.all.js to change that behavior by hand but it's very very ugly ;)

Attachments (2)

905-jForms-datepicker-yearRange.diff (2.1 KB) - added by Julien 11 years ago.
905-jForms-datepicker-yearRange.2.diff (2.2 KB) - added by Julien 11 years ago.

Download all attachments as: .zip

Change History (10)

Changed 11 years ago by Julien

comment:1 Changed 11 years ago by Julien

  • Owner set to Julien
  • Status changed from new to assigned

Here's a patch that makes mindate and maxdate affect the yearRange property of the datepicker.

For setting a range without using mindate or maxdate, it should be done at config level I think. For this, I think that we should be able to generate the js file with php, so we could parse the config file the way we want. Because right now the "static" js file is not flexible enough... I'll make another ticket for that...

comment:2 Changed 11 years ago by Julien

ooops, little mistake in the patch when not using both mindate and maxdate... fixing it...

Changed 11 years ago by Julien

comment:3 Changed 11 years ago by Julien

  • review set to review?

here's the correct patch

comment:4 Changed 11 years ago by foxmask

Hi,

i made a test and its working great !

regards.

comment:5 Changed 11 years ago by Julien

does this patch fix all your problem ? or do you still need the ability to set a yearRange without specifying mindate or maxdate ?

waiting for a review+ for committing into the trunk and 1.1.x as it doesn't break compatibility.

comment:6 Changed 11 years ago by foxmask

my problem was to be able to manage the yearRange, that what this patch does so for me its ok ;)

comment:7 Changed 11 years ago by laurentj

  • Milestone set to Jelix 1.1.3
  • review changed from review? to review+

ok pour 1.1.x et trunk

comment:8 Changed 11 years ago by Julien

  • Resolution set to fixed
  • Status changed from assigned to closed

committed in the trunk and 1.1.x. r1394

Note: See TracTickets for help on using tickets.