- * @class Ext.form.field.Date
- * @extends Ext.form.field.Picker
-
-Provides a date input field with a {@link Ext.picker.Date date picker} dropdown and automatic date
-validation.
-
-This field recognizes and uses the JavaScript Date object as its main {@link #value} type. In addition,
-it recognizes string values which are parsed according to the {@link #format} and/or {@link #altFormats}
-configs. These may be reconfigured to use date formats appropriate for the user's locale.
-
-The field may be limited to a certain range of dates by using the {@link #minValue}, {@link #maxValue},
-{@link #disabledDays}, and {@link #disabledDates} config parameters. These configurations will be used both
-in the field's validation, and in the date picker dropdown by preventing invalid dates from being selected.
-{@img Ext.form.Date/Ext.form.Date.png Ext.form.Date component}
-#Example usage:#
-
- Ext.create('Ext.form.Panel', {
- width: 300,
- bodyPadding: 10,
- title: 'Dates',
- items: [{
- xtype: 'datefield',
- anchor: '100%',
- fieldLabel: 'From',
- name: 'from_date',
- maxValue: new Date() // limited to the current date or prior
- }, {
- xtype: 'datefield',
- anchor: '100%',
- fieldLabel: 'To',
- name: 'to_date',
- value: new Date() // defaults to today
- }],
- renderTo: Ext.getBody()
- });
-
-#Date Formats Examples#
-
-This example shows a couple of different date format parsing scenarios. Both use custom date format
-configurations; the first one matches the configured `format` while the second matches the `altFormats`.
-
- Ext.create('Ext.form.Panel', {
- renderTo: Ext.getBody(),
- width: 300,
- bodyPadding: 10,
- title: 'Dates',
- items: [{
- xtype: 'datefield',
- anchor: '100%',
- fieldLabel: 'Date',
- name: 'date',
- // The value matches the format; will be parsed and displayed using that format.
- format: 'm d Y',
- value: '2 4 1978'
- }, {
- xtype: 'datefield',
- anchor: '100%',
- fieldLabel: 'Date',
- name: 'date',
- // The value does not match the format, but does match an altFormat; will be parsed
- // using the altFormat and displayed using the format.
- format: 'm d Y',
- altFormats: 'm,d,Y|m.d.Y',
- value: '2.4.1978'
- }]
- });
-
- *
- * @markdown