Problem with datefields declared like Vtype="daterange"

  1. #1

    Problem with datefields declared like Vtype="daterange"

    Hello,

    I have in my form two datefields declared like vtype="daterange". The problem is that in the codebehind I initialize the start datefield when I run my applicattion and I try to see my form an error ocurrs: "Microsoft JScript runtime error: 'undefined' is null or not an object".
    Can not I initialize a datefield if this is like daterange?

    Thanks a lot.

    
    .aspx
    
    
    
    
    <table border="0" cellspacing="0" width="100%">
    
    
    <tr valign="bottom">
    
    
    <td style="width: 10%;">
    
    
    <p><asp:Literal ID="lblStartDate" runat="server" Text="<%$ Resources: lblStartDate %>" /></p>
    
    
    <ext:DateField ID="txtStartReservationsDate" Vtype="daterange" Width="120" runat="server" AllowBlank="false" InvalidText="<%$Resources: itemDateErrorText %>" BlankText="<%$Resources: itemObligatory %>" > 
    
    
    <Listeners>
    
    
    <Render Handler="this.endDateField = '#{txtEndReservationsDate}'" />
    
    
    </Listeners> 
    
    
    </ext:DateField> 
    
    
    </td> 
    
    
    <td style="width: 1%;">
    
    
    </td>
    
    
    <td style="width: 2%;" align="center">
    
    
    <asp:Literal ID="lblSeparator1" runat="server" Text="-" /> 
    
    
    </td> 
    
    
    <td style="width: 1%;">
    
    
    </td>
    
    
    <td style="width: 15%;">
    
    
    <p><asp:Literal ID="lblEndDate" runat="server" Text="<%$ Resources: lblEndDate %>" /></p>
    
    
    <ext:DateField ID="txtEndReservationsDate" Vtype="daterange" Width="120" runat="server" AllowBlank="true" InvalidText="<%$Resources: itemDateErrorText %>" > 
    
    
    <Listeners>
    
    
    <Render Handler="this.startDateField = '#{txtStartReservationsDate}'" />
    
    
    </Listeners> 
    
    
    </ext:DateField>
    
    
    </td> 
    
    
    <td style="width: 2%;">
    
    
    </td>
    
    
    
    
    
    
    
    
    </tr>
    
    
    
    
    
    </table>
    
    .aspx.cs
    
    
    
    
    protected override void InitializeModel()
    
    
    {
    
    
    txtStartReservationsDate.Value = DateTime.Now;
    
    
    }



  2. #2

    RE: Problem with datefields declared like Vtype="daterange"

    Hi,

    Try to set Delay="100" for each Render listener
    *
  3. #3

    RE: Problem with datefields declared like Vtype="daterange"

    ok, it works

    thank you very much vladimir

Similar Threads

  1. [CLOSED] [1.2] DateFields in daterange
    By FVNoel in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 05, 2012, 3:42 PM
  2. [CLOSED] V2.0 DateFields with DateRange
    By Aurelio in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 16, 2012, 4:17 PM
  3. [CLOSED] DateField validate problem with Vtype="daterange"
    By asztern in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 30, 2010, 8:06 PM
  4. [CLOSED] Vtype problem
    By majestic in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Apr 12, 2010, 9:47 AM
  5. [CLOSED] DateField with Vtype="daterange" error
    By turione in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jul 27, 2009, 5:39 PM

Posting Permissions