Converting from C1WebEdit to C1InputDate

Posted by: kevin.rowe on 12 March 2021, 2:33 am EST

  • Posted 12 March 2021, 2:33 am EST

    I have a C1WebEdit control that I’m trying to update to a C1InputDate.

    I have tried several times to get the thing to behave the same, but I cannot get the calendar pop up to behave the same.

    Specifically: -

    The tiny default calendar for the C1InputDate appears when the down arrow on the control is clicked no matter what settings i have tried.

    The popup calendar appears, but only stays there as long as you have the mouse down.

    I have looked in the samples but only found an example to set a picker. I tried that but I could not see a way to set the calendar to the one on the page.

    Is this possible, and how?

    the code is below for the javascript executed by the popup event, and the old and new ASP tags #maintable is the full page div for the page to center the calendar on.

    
                <script type="text/javascript">
    
                    function Popup() {
                            $("#<%=C1Calendar1.ClientID %>").c1calendar("popup", {
                                of: '#maintable',
                                at: 'center',
                                my: 'center'
                            });
                    }
    </script>
    ...
    [b]old tag[/b]
    <%--                            <c1i:C1WebDateEdit ID="dteSpecificDate" runat="server" CustomButtonAlign="Right" 
                                    Date="2010-02-19" UpDownAlign="None" OnDateChanged="DteSpecificDate_DateChanged" 
                                     cssclass="datesel datblk1" OnClientCustomButtonClick="Popup()"  Width="200px" Height="80px" >
                                </c1i:C1WebDateEdit>--%>
    [b]<new tag>[/b]
                                <wijmo:C1InputDate ID="dteSpecificDate" Calendar="" runat="server" CustomButtonAlign="Right" Date="03/12/2021 12:25:00" OnClientDropDownButtonMouseDown="Popup" CssClass="datblk1" Height="80px" Width="200px" >
    </wijmo:C1InputDate>
    ...
                <wijmo:C1Calendar CssClass="calfont" ID="C1Calendar1" AutoPostBack="true" runat="server" Culture="en-GB" PopupMode="True" Height="33%" Width="80%" AllowPreview="True"  NavButtons="Quick" OnClientSelectedDatesChanged="SelectDate" OnSelectedDatesChanged="C1Calendar1_SelectedDatesChanged">            </wijmo:C1Calendar>
    
    
    
    
  • Posted 15 March 2021, 1:57 am EST

    Hi Kevin,

    Instead of the OnClientDropDownButtonMouseDown event, you may use the OnClientDropDownOpen event to display the custom Calendar. Unfortunately, I was unable to find a way by which we can hide the default Calendar so I have asked the developers whether is this possible. The internal tracking id of the case is C1WEB-27967. I will update you once I will hear from them.

    Regards,

    Ashwin

Need extra support?

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

Learn More

Forum Channels