trouble with DateField seting hour

  1. #1

    trouble with DateField seting hour

    hello I need to chose date from datafield, and preset 08 as hour, and after that i must have capability to alter 08 hour, to other hour i want.
    after picking date and chosing hour with default being 08, i want to pass this value to next datafield which will receive date and hour
    but something fails in middle of all of this.
    <script runat="server">  
        protected void Page_Load(object sender, EventArgs e)
        {
    
        }
        [DirectMethod]
        public object DirectCheckField_m(string value)
        {
            d_mont.Value = day_Start.Value;
            return true;
        } 
        
    </script>
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Novo dia</title>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Window runat="server" Layout="FitLayout" Width="600">
                <Items>
                    <ext:FormPanel ID="top_1" runat="server" Title="Detalhes" Header="false" Frame="true" Border="false" Layout="ColumnLayout" BodyPadding="10" DefaultAnchor="100%">
                        <Items>
                            <ext:Panel ID="top_left" runat="server" ColumnWidth="0.5" Border="false" Header="false" Layout="VBoxLayout" LabelAlign="Top">
                                <Items>
                                    <ext:DateField ID="day_Start" runat="server" FieldLabel="InÃ*cio" Editable="true" AltFormats="yyyy-MM-dd HH:mm:ss|yyyy-MM-dd 08:mm:ss" Format="yyyy-MM-dd 08:mm:ss" IsRemoteValidation="true">
                                        <RemoteValidation DirectFn="App.direct.DirectCheckField_m" /> 
                                    </ext:DateField> 
                                </Items>
                            </ext:Panel>
                            <ext:Panel ID="top_right" runat="server" ColumnWidth="0.5" Border="false" Header="false" Layout="VBoxLayout" LabelAlign="Top">
                                <Items>
                                    <ext:DateField ID="d_mont" runat="server" FieldLabel="Montagem" Editable="true" Format="yyyy-MM-dd HH:mm:ss" /> 
                                </Items>
                            </ext:Panel>
                        </Items>
                    </ext:FormPanel>
                </Items>
            </ext:Window>
        </form>
    </body>
    </html>
  2. #2

    I have

    I havesearched for sollution durring long time
    and didnt found good or any solution.
    but examples.ext.net offer datefield example, which proved usefull to remove some code
    but didnt solved my problem
  3. #3

    examples.ext.net has faulty behaviour

    Examples.ext.net
    https://examples4.ext.net/#/Form/Dat...From-To_Range/
    when Format is changed to Format="yyyy-MM-dd HH:mm:ss"
    doesnt not perform well on picking same date

    I can pick
    From 2016-03-18 09:00:00
    End 2016-03-18 20:00:00
    and is marked as invalid for From
  4. #4

    i AM VVERY UPSET

    http://prntscr.com/acaxhk

    tHIS IS NO HAPPENING.
    WHY 08 HOUR IS NOT VALID???
  5. #5
    Hello!

    Well, I see your validation asks for a date before 2016-03-01 00:00:00. Something like 2016-02-29 23:59:59 should work while, by the validation feedback, 2016-03-01 00:00:01 should fail!

    Probably you are not carrying the time (from the full date) when defining your validation code behind script, but always using 00:00:00.
    Fabrício Murta
    Developer & Support Expert
  6. #6
    Well, I see your validation asks for a date before 2016-03-01 00:00:00. Something like 2016-02-29 23:59:59 should work while, by the validation feedback, 2016-03-01 00:00:01 should fail!
    when Format is changed to Format="yyyy-MM-dd HH:mm:ss" as example shows

    Can developer team handle the verifying of not only days, but hour and minute and seconds values ?
    just telling that StandardVtype="DateRange" and Vtype="DateRange" are failing to test hour minute and second.
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Novo dia</title>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Window runat="server" Layout="FitLayout" Width="600">
                <Items>
                    <ext:FormPanel ID="top_1" runat="server" Title="Detalhes" Header="false" Frame="true" >
                        <Items> 
                                   
     <ext:DateField ID="startDateField" runat="server" FieldLabel="from" Type="Date"  StandardVtype="DateRange" Format="yyyy-MM-dd HH:mm:ss" > 
      <CustomConfig>
       <ext:ConfigItem Name="endDateField" Value="endDateField" Mode="Value" />
      </CustomConfig>
     </ext:DateField>
     <ext:DateField ID="endDateField" runat="server" FieldLabel="to" StandardVtype="DateRange" Editable="true" Format="yyyy-MM-dd HH:mm:ss" > 
      <CustomConfig>
         <ext:ConfigItem Name="startDateField" Value="startDateField" Mode="Value" />
      </CustomConfig>
     </ext:DateField>
                      </Items>
                    </ext:FormPanel>
                </Items>
            </ext:Window>
        </form>
    </body>
    </html>


    I can pick
    From 2016-03-18 09:00:00
    End 2016-03-18 20:00:00
    and is marked as invalid for From

Similar Threads

  1. [CLOSED] CalendarPanel set start/end hour
    By lasting in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 25, 2014, 3:21 PM
  2. [CLOSED] Invalid date and hour with pt-BR format
    By ermanni.info in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Apr 20, 2014, 2:25 AM
  3. [CLOSED] timefield 24 hour problem
    By zwf in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 25, 2012, 5:20 PM
  4. how to change the hour in the demo My Calendar
    By diego0404 in forum 1.x Help
    Replies: 2
    Last Post: Feb 01, 2012, 12:03 AM

Tags for this Thread

Posting Permissions