Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#9798 closed defect (fixed)

[patch] [cla] YearTextBox values aren't consistent

Reported by: Nicholas VanderPyle Owned by: Shane O'Sullivan
Priority: high Milestone: 1.4
Component: DojoX Form Version: 1.3.2
Keywords: Cc:
Blocked By: Blocking:

Description

dojox.form.YearTextBox? is not consistent about the data type it accepts for value, returns for value, and returns during onChange.

Attached is a patch that allows YearTextBox? to continue accepting a Date for min/max constraints, uses a numeric year to get/set value, and a numeric year returned during onChange.

This may reference ticket #9338.

Attachments (1)

SemiconsistentYearTextBoxPatch.txt (1.5 KB) - added by Nicholas VanderPyle 10 years ago.

Download all attachments as: .zip

Change History (9)

Changed 10 years ago by Nicholas VanderPyle

comment:1 Changed 10 years ago by bill

Summary: YearTextBox values aren't consistent[patch] [no cla] YearTextBox values aren't consistent

We can't look at patches unless you file a CLA, see http://dojofoundation.org/cla/, thanks. (I don't see your name under http://dojotoolkit.org/dojo-contributors)

comment:2 Changed 10 years ago by bill

Summary: [patch] [no cla] YearTextBox values aren't consistent[patch] [cla] YearTextBox values aren't consistent

comment:3 Changed 10 years ago by dante

Milestone: tbd1.4
Owner: changed from dante to Nathan Toone

giving dojox.form.* to toonetown for review. this one is patch/cla.

comment:4 Changed 10 years ago by Nathan Toone

Owner: changed from Nathan Toone to Shane O'Sullivan

Passing the buck yet again - Shane is the one who knows the dojox.form.YearTextBox? code.

comment:5 Changed 10 years ago by Shane O'Sullivan

Resolution: fixed
Status: newclosed

Submitted fixes in [20413] for Day, Month and Year date boxes.

comment:6 Changed 10 years ago by Shane O'Sullivan

(In [20415]) Refs #9798 Cleaning up some logging

comment:7 Changed 10 years ago by Adam Peller

Shane, this code from YearTextBox? looks questionable:

return dojo.date.locale.parse("01/01/" + value, constraints)

That's a US-specific format, or at least specific to locales which use slashes and leading zeros, so won't it fail in many other locales? If you want to parse user input for year only, I think you can use a selector:"year"

comment:8 Changed 10 years ago by Shane O'Sullivan

Agreed, fixed in a subsequent checkin

Note: See TracTickets for help on using tickets.