Apr 18, 2014, 6:42 PM
[CLOSED] Invalid date and hour with pt-BR format
Hi!
In my application I use location pr-BR. I noticed that the DateField and TimeField components are exhibiting different behaviors to validate the entered value.
Below an example of how I'm using the components:
For example, in the date field inform "30042014" and the component is marked as invalid. If I inform "04302014" the field is validated and the value displayed to the user is "30/04/2014". The user in Brazil is not used to inform "mm / dd / yyyy". How do I change this behavior?
Something similar happens with the field of time. If I inform "157", the value displayed is "01:57". If I inform "1200", the value displayed is "12:00". If I inform "1347", the field is marked as invalid. How do I change this behavior?
Thanks!
Ermanni
In my application I use location pr-BR. I noticed that the DateField and TimeField components are exhibiting different behaviors to validate the entered value.
Below an example of how I'm using the components:
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
}
</script>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<title>Ext.NET v2 Example</title>
</head>
<body>
<form id="Form1" runat="server" style="margin: 20px;">
<ext:ResourceManager ID="ResourceManager1" runat="server" Locale="pt-BR" />
<ext:DateField ID="DateField" runat="server" FieldLabel="Data (30/04/2014 - dd/mm/yyyy) " LabelWidth="200"/>
<ext:TimeField ID="TimeField" runat="server" FieldLabel="Hora (13:47 - hh:mm) " LabelWidth="200"/>
</form>
</body>
</html>
For example, in the date field inform "30042014" and the component is marked as invalid. If I inform "04302014" the field is validated and the value displayed to the user is "30/04/2014". The user in Brazil is not used to inform "mm / dd / yyyy". How do I change this behavior?
Something similar happens with the field of time. If I inform "157", the value displayed is "01:57". If I inform "1200", the value displayed is "12:00". If I inform "1347", the field is marked as invalid. How do I change this behavior?
Thanks!
Ermanni
Last edited by Daniil; May 06, 2014 at 6:51 AM.
Reason: [CLOSED]