Opened 8 years ago
Closed 5 years ago
#16637 closed enhancement (patchwelcome)
DateTextBox: reflect changes to <input> to Calendar while dropdown open
Reported by: | igilfanov | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.13 |
Component: | Dijit - Form | Version: | 1.8.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
define([ "dojo/_base/declare", // declare "../Calendar", "./_DateTimeTextBox" ], function(declare, Calendar, _DateTimeTextBox){ // module: // dijit/form/DateTextBox return declare("dijit.form.DateTextBox", _DateTimeTextBox, { // summary: // A validating, serializable, range-bound date text box with a drop down calendar // example: // | new DateTextBox({value: new Date(2009, 0, 20)}) // example: // | <input data-dojo-type='dijit/form/DateTextBox' value='2009-01-20'> baseClass: "dijitTextBox dijitComboBox dijitDateTextBox", popupClass: Calendar, _selector: "date", // value: Date // The value of this widget as a JavaScript Date object, with only year/month/day specified. // If specified in markup, use the format specified in `stamp.fromISOString`. // set("value", ...) accepts either a Date object or a string. value: new Date(""), // value.toString()="NaN" validator: function(/*anything*/ value, /*__Constraints*/ constraints){ var isValid = (new RegExp("^(?:" + this._getPatternAttr(constraints) + ")"+(this.required?"":"?")+"$")).test(value) && (!this.required || !this._isEmpty(value)) && (this._isEmpty(value) || this.parse(value, constraints) !== undefined); // Boolean if(this.dropDown && isValid ==true){ this.dropDown.set('value', this.parse(value, constraints), false); } return isValid; } }); });
Change History (8)
comment:1 Changed 8 years ago by
Owner: | changed from Douglas Hays to igilfanov |
---|---|
Status: | new → pending |
comment:2 Changed 8 years ago by
Status: | pending → new |
---|
During a set date in the textbox when case of an open calendar, automatically select the date in the calendar. Similar to jQuery UI Datepicker opportunities.
comment:3 Changed 8 years ago by
Please activate this enhancement starting with the new version 1.8.4
comment:4 Changed 8 years ago by
I think if you type in a date and then open the dropdown it already selects that date. I guess you want it to select the date as the user is type? This enhancement doesn't seem very useful.
comment:5 Changed 8 years ago by
Then the choice of the year to become more exhausting. I wish that the date is automatically set in the calendar when you opened the dropdown, while the user types in the textbox. This enhancement very useful.
comment:6 Changed 8 years ago by
Owner: | changed from igilfanov to Douglas Hays |
---|---|
Priority: | undecided → low |
Status: | new → assigned |
Summary: | Automatic selection of the date on the calendar when you enter a date in the field. → DateTextBox: reflect changes to <input> to Calendar while dropdown open |
I wouldn't use the word exhausting. If for example:
- open the drop down
- change the date from 1/1/2000 to 1/1/1900
Then to reflect the change from 2000 --> 1900 into the calendar, you need to close and reopen the drop down. I suppose it would be marginally nicer if you didn't need to do that, but not sure if it's worth the effort in dijit.
Doug?
comment:7 Changed 7 years ago by
Owner: | Douglas Hays deleted |
---|---|
Status: | assigned → open |
comment:8 Changed 5 years ago by
Milestone: | tbd → 1.12 |
---|---|
Resolution: | → patchwelcome |
Status: | open → closed |
Given that no one has shown interest in creating a patch in the past 2+ years, I'm closing this as patchwelcome.
Please explain what you're trying to accomplish and how this is better than the current DateTextBox?.