Customize the hour range

Hello,

1) In here i can see time starting on 12.00 AM. Can i change this time to start at 8.00 AM to 5.00 PM. 


2) For all day mode, can i set default time to start at 8.00 AM to 5.00 PM. Currently its showing like this way


Thank you


1 Reply

RV Ravikumar Venkatesan Syncfusion Team August 8, 2022 05:13 PM UTC

Hi Kavishka,


We have validated your requirement “Customize the hour range” at our end. We have achieved your requirement with help of the AppointmentWindowOpen event of the Schedule with the below code snippet. We have prepared a sample for your reference.


[Default.aspx]

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">

 

    <div>

        <ej:Schedule ID="Schedule2" StartHour="8" EndHour="18" AppointmentWindowOpen="onAppointmentWindowOpen">

        </ej:Schedule>

    </div>   

 

</asp:Content>

 

<asp:Content ID="ScriptContent" runat="server" ContentPlaceHolderID="ScriptSection">

    <script type="text/javascript">

        function onAppointmentWindowOpen(args) {

            if ($('#Schedule2starttime').data("ejTimePicker").model.minTime !== "08:00 AM") {

                $('#Schedule2starttime').ejTimePicker({ minTime: "08:00 AM", maxTime: "06:00 PM" });

                $('#Schedule2endtime').ejTimePicker({ minTime: "08:00 AM", maxTime: "06:00 PM" });

            }

        }

    </script>

</asp:Content>


Kindly try the shared sample and let us know if you need any further assistance.


Regards,

Ravikumar Venkatesan

If this post is helpful, kindly consider accepting it as the solution so that other members can locate it more quickly.


Attachment: ejwebformsschedulecustomizeeditorwindowstartendhours_be525bde.zip

Loader.
Up arrow icon