Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#12035 closed defect (fixed)

Incorrect year format passed for jquery datepicker

Reported by: anonymous Owned by: Ryan J Ollos
Priority: normal Component: DateFieldPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

filter.py

format = {'dmy': 'dd%smm%syy',
          'mdy': 'mm%sdd%syy',
          'ymd': 'yy%smm%sdd'
         }.get(self.date_format, 'dd%smm%syy') % (self.date_sep, self.date_sep)

According to jquery ui docs http://api.jqueryui.com/datepicker/ "yy" refers to four-digit letter

y - year (two digit)
yy - year (four digit)

Trac although expects milestone dates to be in format of MM/DD/YY hh:mm:ss, thus I imagine the year format should be just "y"?

Attachments (0)

Change History (3)

comment:1 Changed 10 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

In 14331:

2.0.0dev: Use 2-digit year format for compatibility with milestone date field. Fixes #12035.

comment:2 Changed 10 years ago by Ryan J Ollos

We should probably just give the user full control to specify the format, be it a 2 or 4 digit year. I'll wait until someone complains before making the effort since this plugin will be deprecated with Trac 1.2.

comment:3 Changed 10 years ago by Ryan J Ollos

In 14332:

2.0.0dev: Restore line accidentally deleted in [14331]. Refs #12035.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.