Daniil, i found an issue regarding the "Month" DateField format
On the following example (Default behaviour), _dt.getValue() outputs the date at the first day of the selected month / year
Mon Dec 01 2014 00:00:00 GMT-0300 (Hora oficial do Brasil)
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<script type="text/javascript">
var analyze = function () {
alert(App._dt.getValue());
}
</script>
</head>
<body>
<ext:ResourceManager runat="server" ScriptMode="Debug" />
<ext:Button Text="Analyze" runat="server">
<Listeners>
<Click Handler="analyze();" />
</Listeners>
</ext:Button>
<br />
<ext:DateField ID="_dt" Type="Month" runat="server" />
</body>
</html>
But when DateField's Format is set to "m/y" or "MMMM yyyy", _dt.getValue() outputs the (current day or last day of the month) of the selected month / year.
Mon Dec 22 2014 00:00:00 GMT-0300 (Hora oficial do Brasil)
To overcome the issue presented above, it's necessary to override Ext.form.field.Date's safeParse and get the first date of the month, as shown below (Lines 11 to 15):
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<script type="text/javascript">
var analyze = function () {
alert(App._dt.getValue());
}
Ext.form.field.Date.override({
safeParse: function (value, format) {
var result = this.callParent(arguments);
if (this.type == "month") {
return Ext.Date.getFirstDateOfMonth(result);
}
return result;
}
});
</script>
</head>
<body>
<ext:ResourceManager runat="server" ScriptMode="Debug" />
<ext:Button Text="Analyze" runat="server">
<Listeners>
<Click Handler="analyze();" />
</Listeners>
</ext:Button>
<br />
<ext:DateField ID="_dt" Type="Month" Format="MMMM yyyy" runat="server" />
</body>
</html>
Mon Dec 01 2014 00:00:00 GMT-0300 (Hora oficial do Brasil)