29 Mar 2011 8:20 AM #1
Datefield not working with format m/Y
the datefield is not working with format m/Y
Today is the 29 March 2011 (french) and i have a datefield with format: m/Y.
I put the value : '02/2011' and the datefield changes my value to '03/2011' because the day is not defined and the datefield adds the day "29" to my value "02/2011". But because the 29/02/2011 does not exist, the datefield changes it to '29/03/2011' -> '03/2011'.
I don't want the day in my datefield and I don't want the datefield to change my date. If there is a date problem, I just want an error message.
Ext-js version : 3.1.1
Sorry for my english.
Thanks in advance,
29 Mar 2011 9:07 AM #2
29 Mar 2011 9:10 AM #3
29 Mar 2011 10:03 AM #4
Quite alright. I'm just glad someone else noticed it. You did give me a hint that allows me to work around the issue (though it works for me because each application is pretty self contained. For bigger projects this probably wouldn't work.) What I'm doing is setting the Date.default.d = 15 so it's not using todays date. This guarantees the day is in the current month.
29 Mar 2011 11:35 PM #5
I added this code to my prototype file :
d: 15 // default to first day of the month
and it works fine !!
Thank you !!!!!!
30 Mar 2011 12:27 AM #6
By roshniblr in forum Ext 3.x: Help & DiscussionReplies: 18Last Post: 5 Nov 2009, 6:41 AM
By kumo in forum Ext 2.x: Help & DiscussionReplies: 5Last Post: 4 Aug 2009, 8:01 AM
By tomlobato in forum Ext 2.x: Help & DiscussionReplies: 5Last Post: 13 May 2009, 6:47 AM
By seymores in forum Ext 2.x: BugsReplies: 31Last Post: 13 Jul 2008, 11:07 PM
By codeworx in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 21 May 2008, 8:56 AM