C1InputDate and C1Calendar 2025v2 399

Posted by: enrique.pv-ext on 27 March 2026, 8:07 am EST

  • Posted 27 March 2026, 8:07 am EST

    Hi,

    Migrate from 2010v1 to 2025v2 399 in ASP.NET WebForms NET Framework 4.8.1.

    Using C1InputDate from C1.Web.Wijmo.Controls.48.dll

    Changes C1DateInput to C1InputDate control.

    Using C1InputDate and C1Calendar is good pattern?

    or use only C1InputDate ?

                <asp:Label ID="lblFromDate" runat="server" Text="Desde:" CssClass="minititle"></asp:Label>
    
                <%--WebCalendar="C1Calendar2"
                                    WebCalendarPopupPosition="Below"
                                    CustomButtonAlign="Right"--%>
                <c1i:C1InputDate ID="txtFromDateTime" runat="server" Width="105px" 
                                    DateFormat="dd/MM/yyyy"  Culture="Spanish (Peru)"
                                    Calendar="C1Calendar2"/>
    
    <%--                                ClientOnAfterClose="CalendarClosedDesde" FirstDayOfWeek="Monday" 
                                    CalendarTitle="{0:dd} de {1:MMMM} de {2:yyyy}" 
                                    MonthViewTitle="{0:MMMM} de {1:yyyy}">--%>
                <cc4:c1calendar ID="C1Calendar2" runat="server" style="font-size: xx-small" 
                                    Height="180px" Width="230px"
                                    PopupMode="True" WeekDayFormat="Abbreviated" AllowPreview="false"
                                    ShowWeekNumbers="false"
                                    TitleFormat="dd 'de' MMMM 'de' yyyy"
                                    MonthViewTitleFormat="MMMM 'de' yyyy" />
                </div>
                
                <div style="float:left; margin-left:15px;">
                 <asp:Label ID="lblToDate" runat="server" Text="Hasta:" CssClass="minititle"></asp:Label>
                <c1i:C1InputDate ID="txtToDateTime" runat="server" Width="105px" 
                                    DateFormat="dd/MM/yyyy" Calendar="C1Calendar3" 
                                    Culture="Spanish (Peru)"
                                     />
    
    <%--                                ClientOnAfterClose="CalendarClosedDesde" FirstDayOfWeek="Monday" 
                                    CalendarTitle="{0:dd} de {1:MMMM} de {2:yyyy}" 
                                MonthViewTitle="{0:MMMM} de {1:yyyy}">--%>
    
                <cc4:c1calendar ID="C1Calendar3" runat="server" style="font-size: xx-small" 
                                    Height="180px" Width="230px"
                                    PopupMode="True" WeekDayFormat="Abbreviated" AllowPreview="false"
                                    ShowWeekNumbers="false"                                                   
                                    TitleFormat="dd 'de' MMMM 'de' yyyy"
                                    MonthViewTitleFormat="MMMM 'de' yyyy" />

    any suggestions?

  • Posted 30 March 2026, 6:51 am EST

    Hello Enrique,

    Since C1InputDate includes a built-in calendar, there is typically no need to use a separate C1Calendar control. However, if your implementation requires specific calendar customizations or behavior that is not available through C1InputDate, you may choose to use an external C1Calendar.

    The best approach depends on your exact implementation and requirements. If you could share details of your previous setup or let us know if you’re facing any issues with the current implementation, we’d be happy to suggest the most suitable way forward.

    Regards,

    Uttkarsh.

  • Posted 10 September 2026, 6:59 am EST - Updated 10 September 2026, 7:37 am EST

    I have:

    ClientOnAfterClose=“CalendarClosedDesde”: It seems you are referring to when the Calendar is closed in InputDate. If so, you can use “OnClientDropDownClose” in InputDate.

    FirstDayOfWeek=“Monday”: We’re sorry but we did not find a direct replacement for this property.

    As per our understanding, you are working with Spanish culture. If so, please set the Culture property to “es-ES” and this will automatically set the first day of the week to Monday.

    CalendarTitle=“{0:dd} de {1:MMMM} de {2:yyyy}”: You can use “TitleFormat” property setting it as “dd ‘de’ MMMM ‘de’ yyyy”.

    MonthViewTitle=“{0:MMMM} de {1:yyyy}”: You can use “MonthViewTitleFormat” property setting it as “MMMM ‘de’ yyyy”.

    Legacy Styling properties: Legacy styling properties are not used anymore, please use CSS based styling instead.

    C1Calendar legacy properties:

    ClientOnAfterClose=“CalendarClosedDesde”

    FirstDayOfWeek=“Monday”

    CalendarTitle=“{0:dd} de {1:MMMM} de {2:yyyy}”

    MonthViewTitle=“{0:MMMM} de {1:yyyy}”

    New properties:

    TitleFormat=“dd ‘de’ MMMM ‘de’ yyyy”

    MonthViewTitleFormat=“MMMM ‘de’ yyyy”

    When canI use the SelectDateDesde function ?

    SelectDateDesde is not required now ?

     function SelectDateDesde() {
         var date = $('#<%= Text1.ClientID %>').c1inputdate('option', 'date');
         var calendar = $('#<%= C1CalDesde.ClientID %>');
    
         // Navigate the calendar to the month of the selected date FIRST
         calendar.c1calendar('option', 'displayDate', date);
         // Then select the date
         calendar.c1calendar('selectDate', date);
    
         calendar.c1calendar("popup", {
             of: $('#calendar-popup'),       // anchor element
             my: 'right top',               // which corner of the calendar to anchor
             at: 'right bottom'             // which corner of the anchor element to align to
         });
     }
    

    I have html markup

     <cc3:C1InputDate ID="Text1" runat="server" Height="18px" Width="110px"
        DateFormat="dd/MM/yyyy" Calendar="C1CalDesde" 
       DropDownButtonAlign="Right" PopupPosition-At-Left="Right"  />
    
     <cc4:C1Calendar ID="C1CalDesde" runat="server" Style="font-size: xx-small"
         Height="180px" Width="230px"
         PopupMode="True" WeekDayFormat="Abbreviated" AllowPreview="false"
         ShowWeekNumbers="false" ShowWeekDays="false"
         TitleFormat="dd 'de' MMMM 'de' yyyy" MonthViewTitleFormat="MMMM 'de' yyyy" />
    

    Maybe using OnClientDropDownClose ?

  • Posted 11 September 2026, 2:28 am EST

    Hello Enrique,

    Following up on this, please also refer to our earlier clarification on ticket [C1WEB-30340] in the C1DateInput to C1InputDate thread, which is directly relevant here:

    The Calendar property on C1InputDate does not attach or replace the dropdown with an external C1Calendar control. C1InputDate always uses its own internally-managed calendar instance for the dropdown; the Calendar property only lets you configure that internal instance (formatting, titles, etc.), not swap it out for C1CalDesde. Synchronization between Text1 and its internal calendar is automatic, but C1CalDesde as a separate, standalone control is a different instance and is not kept in sync with Text1 automatically.

    So whether SelectDateDesde() is still needed depends on why C1CalDesde exists in your markup:

    • If C1CalDesde was only ever meant to act as the dropdown calendar for Text1, it’s redundant now — Text1’s built-in internal calendar already handles that, and you can remove both C1CalDesde and SelectDateDesde().
    • If you still need C1CalDesde for some other purpose (e.g., displayed elsewhere on the page, or used independently), it will need to stay manually synced with Text1, and a function like SelectDateDesde() is still required. For the popup positioning logic in that case, our earlier example in the legacy C1Calendar thread using popup({ of, my, at }) still applies.

    Could you clarify what role C1CalDesde plays in your page beyond being Text1’s dropdown? That will help us confirm the right approach.

    Regards,

    Uttkarsh

  • Posted 11 September 2026, 6:25 am EST

    LEGACY

    <cc3:C1DateInput ID="Text1" runat="server" Height="18px" Width="110px" DateFormat="dd/MM/yyyy"
              WebCalendar="C1CalDesde" WebCalendarPopupPosition="Below"
              CustomButtonAlign="Right" 
              UseEmbeddedVisualStyles="False" VisualStyle="Vista"
              VisualStylePath="~/VisualStyles"/>
    
          <cc4:C1Calendar ID="C1CalDesde" runat="server" style="font-size: xx-small" 
              UseEmbeddedVisualStyles="False" VisualStyle="Vista"
              VisualStylePath="~/VisualStyles" Height="180px" Width="230px"
              PopupMode="True"
              WeekDayFormat="Abbreviated"
              AllowPreview="false"
              ShowWeekNumbers="false"
              ShowWeekDays="false"
              CalendarTitle="{0:dd} {0:MMMM} de {1:yyyy}" 
              MonthViewTitle="{0:MMMM} de {1:yyyy}"
              ClientOnAfterClose="CalendarClosedDesde" 
              FirstDayOfWeek="Monday">

    function SelectDateDesde() not used neither called

    ClientOnAfterClose=“CalendarClosedDesde” → CalendarClosedDesde is called ?

    MIgrate to new version:

                                        <cc3:C1InputDate ID="Text1" runat="server" Height="18px" Width="110px"
                                           DateFormat="dd/MM/yyyy" Calendar="C1CalDesde" 
                                          DropDownButtonAlign="Right" PopupPosition-At-Left="Right"  />
    
                                        <cc4:C1Calendar ID="C1CalDesde" runat="server" Style="font-size: xx-small"
                                            Height="180px" Width="230px"
                                            PopupMode="True" WeekDayFormat="Abbreviated" AllowPreview="false"
                                            ShowWeekNumbers="false" ShowWeekDays="false"
                                            TitleFormat="dd 'de' MMMM 'de' yyyy" MonthViewTitleFormat="MMMM 'de' yyyy" />
    

    function CalendarClosedDesde is required ? (after close) ?

  • Posted 14 September 2026, 11:39 pm EST

    Hello Enrique,

    To answer both parts:

    Legacy: Yes, since WebCalendar=“C1CalDesde” made C1CalDesde the actual dropdown calendar for Text1, ClientOnAfterClose=“CalendarClosedDesde” would fire every time that dropdown closed. That’s expected behavior for the old control.

    Migrated version: As noted earlier, C1InputDate’s Calendar property does not make C1CalDesde the dropdown; C1InputDate always shows its own internal calendar. So, a ClientOnAfterClose handler on C1CalDesde will no longer fire in response to Text1’s dropdown closing, because C1CalDesde is no longer involved in that interaction at all.

    If you want equivalent “after close” behavior for Text1, you should wire it up using OnClientDropDownClose directly on the C1InputDate control (Text1) instead of on C1CalDesde. Whether you need a CalendarClosedDesde-equivalent function at all depends on what that handler used to do — if it only updated or synced C1CalDesde with the selected date, it’s no longer needed, since C1CalDesde is redundant in this markup (per our earlier note, unless you’re using C1CalDesde independently elsewhere on the page).

    Could you confirm whether C1CalDesde is displayed or used anywhere else besides being declared alongside Text1? That will help us confirm whether you can drop it (and CalendarClosedDesde) entirely, or whether you need to keep it manually synced.

    Regards,

    Uttkarsh

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels