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

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1028 closed bug (wontfix)

jForms : no javascript initialisation on localedate when input is not required

Reported by: isepman Owned by:
Priority: normal Milestone: Jelix 1.1.6
Component: jelix:forms Version: 1.1.3
Severity: normal Keywords:
Cc: dhuguet@… Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version: 5.3


Example : locale = FR_fr

<input ref="date_required" required="true" type="localedate">

<input ref="date_optional" required="false" type="localedate">

When I display an initialized form using {ctrl_control},
the first date is formatted (01/01/2009) and the second isn't (2009-01-01).
And when I set the optionnal field as required, then it's formatted.
As well, if I set the first field to optionnal, it's not formatted.

I'm pretty sure this error comes from HTML builder generated javascript since both fields are formatted by JQuery.
But I'm not good enough to fix it.

Change History (3)

comment:1 Changed 12 years ago by laurentj

  • Milestone changed from Jelix 1.3 to Jelix 1.1.6
  • review review? deleted

comment:2 Changed 12 years ago by isepman

  • Cc dhuguet@… added
  • Resolution set to wontfix
  • Status changed from new to closed

My mistake, there is no bug there... I did a "raw" setData on a date control without formatting my date. So if the field was required, the javascript forced the date of the day, and did nothing otherwise. Would it be possible (or useful?) that when we do a setData on a form, it automaticaly detect and convert date format?

comment:3 Changed 12 years ago by laurentj

create an other ticket...

Note: See TracTickets for help on using tickets.