PDA

View Full Version : Strange problem with DateField



max_coder
1 Jul 2008, 2:42 AM
Hello,

I have update ExtJs 2.1 and now I have a problem.
When I select first date field (e.g 10-May-2008) and after that I try to select date in the second date field, value of the first date field resets.

In the previouse version of ExtJs that I have uploaded aprox 2 months ago it worked fine

Here is code example:


<html>
<head>

<link rel="stylesheet" type="text/css" href="ext-2.1/resources/css/ext-all.css"/>
<script language="JavaScript" src="ext-2.1/adapter/ext/ext-base.js"></script>
<script language="JavaScript" src="ext-2.1/ext-all.js"></script>
<script language="JavaScript">

/*
* Ext JS Library 2.0.2
* Copyright(c) 2006-2008, Ext JS, LLC.
* [email protected]
*
* http://extjs.com/license
*/

Ext.onReady(function(){
viewport = new Ext.Viewport({
layout:'border',
items:[

new Ext.FormPanel({
region:'center',
id:'center',
collapsible: true,
margins:'0 5 5 5',
title:'Date Filter',
labelAlign: 'top',
title: 'Time Filter',
bodyStyle:'padding:5px',
height: 80,
items: [
new Ext.form.DateField({
fieldLabel: 'From',
name: 'from',
id: 'from',
width:150,
allowBlank:true,
readOnly: true,
format: 'Y-M-d'
}),
new Ext.form.DateField({
fieldLabel: 'To',
name: 'to',
id: 'to',
width:150,
allowBlank:true,
readOnly: true,
format: 'Y-M-d'
})
]
})
]
});
});

</script>
</head>
<body>
<div id="west"></div>
<div id="center"></div>
<div id="csvform" style="display:none"></div>
</body>
</html>


I have tested it in firefox2/3 and IE

What's wrong with my code?
Does anybody have any suggestion about the problem?

bone
1 Jul 2008, 2:57 AM
parseDate issue.... been there, cursed at it, and found the solution

http://extjs.com/forum/showthread.php?t=33112

Copy the code in mystix' post into your ext-overrides or directly into the ext-all.js (in the bottom)


-bone

mystix
1 Jul 2008, 5:26 AM
been there, cursed at it, and found the solution

that explains why i've been sneezing incessantly these past two months... :>

bone
3 Jul 2008, 5:59 AM
that explains why i've been sneezing incessantly these past two months... :>

(in mr.burns voice)
eeeeextellent!


;)