pradeep_123
24 Mar 2007, 10:33 PM
Hi all,
I am using an ext calendar,
I would like to change the date format which is getting in the text box.
So where should i make the changes?
Thanks in advance
JeffHowden
24 Mar 2007, 10:54 PM
Hi all,
I am using an ext calendar,
I would like to change the date format which is getting in the text box.
So where should i make the changes?
Thanks in advance
From the excellent documentation:
http://www.yui-ext.com/deploy/ext-1.0-alpha3/docs/index.html#output/Ext.form.DateField.html
The DateEditor supports the following configuration options:
* format - The date format for the editor. The format is identical to PHP date() and text is allowed. Credit for that goes to this fantastic date library. This format is for the editor only and doesn't affect the rendering of the cell when not in edit mode. Your rendering function can use any date format it wants.
* minValue - The minimum allowed date. Can be either a Javascript date object or a string date in the specified format.
* maxValue - The maximum allowed date. Can be either a Javascript date object or a string date in the specified format.
* minText - The tooltip to display when the date in the cell is before minValue.
* maxText - The tooltip to display when the date in the cell is after maxValue.
* invalidText - The text to display when the date in the field is invalid (for example: 02/31/06)
* disabledDays - An array of days to disable, 0 based. For example, [0, 6] disables Sunday and Saturday.
* disabledDaysText - The tooltip to display when the date in the cell (or DatePicker) falls on a disabled day.
* disabledDates - An array of "dates" to disable, as strings. These strings will be used to build a dynamic regular expression so they are very powerful. For example, ["03/08/2003", "09/16/2003"] would disable those dates, but ["03/08", "09/16"] would disable them for every year. If you are using short years, you will want to use ^ to tell the regular expression to only match the beginning like ["^03/08"]. To disable March of 2006: ["03/../2006"] or every March ["^03"]. In order to support regular expressions, if you are using a date format that has "." in it, you will have to escape the dot when restricting dates. For example: ["03\\.08\\.03"].
* disabledDatesText - The tooltip to display when the date in the cell (or DatePicker) falls on a disabled date.
* allowBlank - True if the cell is allowed to be empty.
* blankText - The tooltip (error message) to display when the cell is empty and is not allowed to be.
* validator - Any custom validation function you want called. The function must return true if the data is valid or an error message otherwise.
* validationDelay - The delay in milliseconds for validation. Each time the user types something the field is validated after a specified delay, setting this value allows you to customize that delay (for example, if your custom validation routine is slow).
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.