PDA

View Full Version : datefield in format "m.Y"



PSB
31 Oct 2012, 12:06 AM
Hi Ext Team!

1. I have a datefield in my project:


xtype: "datefield",
name: "order_expectedDate",
fieldLabel: "Budget date",
width: 255,
format: (order_type != 5 && order_type != 7) ? "d.m.Y" : "m.Y",
submitFormat: "Y-m-d",
hidden: (order_type != 1 && order_type != 2) ? false : true,
disabled: (order_type != 1 && order_type != 2) ? false : true,
minValue: new Date(),
startDay: 1,
readOnly: false,
allowBlank: false


2. User fill this datefield - for example 15.11.2012 (datefield display "11.2012")
3. After lost focus, datefield is automatically changed to 12.2012

What could be wrong?

James Goddard
31 Oct 2012, 4:20 AM
Looking at your code the date should change to m.Y when it loses focus. It's hard to tell from your post, is that what you are seeing and you don't understand why or is it failing to change the format?