Opened 9 years ago

Closed 4 years ago

#11835 closed enhancement (patchwelcome)

DateTextBox: Allow specifying a single pattern for displaying, parsing, serializing a date

Reported by: rstoyanchev Owned by:
Priority: high Milestone: 1.13
Component: Dijit - Form Version: 1.5
Keywords: Cc:
Blocked By: Blocking:

Description

The link below explains how dates are displayed using locale information and how a fixed format is used for dates sent to and from the server:

http://docs.dojocampus.org/dijit/form/DateTextBox#standard-date-format

Using a fixed format seems like a good idea because it encourages a single format to use between loosely coupled client and server. It also puts the responsibility for displaying formatted dates on the client side and the server only needs to know one format.

In practice however, there are many reasons why server side code needs to be aware of and control the date format: applications often get custom requirements for how to display dates, applications may be built to support switching locales regardless of the browser default locale, the database may insist on a certain format, Dojo may not be the only way to display dates according to user requirements, and so on.

The solution proposed here simply does not work and frankly seems like a workaround for what the text admits is a legitimate need: http://docs.dojocampus.org/dijit/form/DateTextBox#alternate-date-format-to-from-a-server

In addition to what DateTextBox? already provides, it should be possible to also provide a single date pattern that would be used for all the needs of DateTextBox? - parsing, serializing, and displaying.

Change History (6)

comment:1 Changed 9 years ago by bill

Component: GeneralDijit
Owner: anonymous deleted
Summary: Allow specifying a single pattern for displaying, parsing, serializing a date in dijit.form.DateTextBoxDateTextBox: Allow specifying a single pattern for displaying, parsing, serializing a date

I don't see why it would need to be a single pattern, it would be more flexible to have one pattern for display and another for submission (which could be the same).

comment:2 Changed 9 years ago by bill

Component: DijitDijit - Form
Owner: set to Douglas Hays

comment:3 Changed 9 years ago by Douglas Hays

Milestone: tbdfuture

No immediate plans to implement this. Patches (with CLA) are always welcome.

comment:4 Changed 6 years ago by Douglas Hays

Owner: Douglas Hays deleted
Status: newassigned

comment:5 Changed 6 years ago by Douglas Hays

Status: assignedopen

comment:6 Changed 4 years ago by dylan

Milestone: future1.12
Resolution: patchwelcome
Status: openclosed

Given that no one has shown interest in creating a patch in the past 4+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.