BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
How can I customize the time to be changed so it won't be from 30 in 30 min, and to be from 15 to 15 min. For example 10:00,10:15,10:30,10:45,11:00 etc.
I've managed to do this by adding
<ScheduleTimeScale Interval=60 SlotCount="4"></ScheduleTimeScale>
but if I add a ScheduleTemplates with an EditorTemplate only the slots are split but the time is still from 30 in 30 min
Hi Cosmin,
Based on your query we suspect that you want to customize the time values of the DateTimePicker in the EditorTemplate of the Scheduler. You can achieve this with help of the Step property of the DateTimePicker as shown in the below code snippet.
[index.cshtml]
<SfSchedule TValue=AppointmentData> <ScheduleTimeScale Interval="@interval" SlotCount="@slotCount"></ScheduleTimeScale> <ScheduleTemplates> <EditorTemplate> <table class="custom-event-editor" width="100%" cellpadding="5"> <tbody> <tr> <td class="e-textlabel">From</td> <td colspan="4"> <SfDateTimePicker @bind-Value="@((context as AppointmentData).StartTime)" Step="@(interval / slotCount)"></SfDateTimePicker> </td> </tr> <tr> <td class="e-textlabel">To</td> <td colspan="4"> <SfDateTimePicker @bind-Value="@((context as AppointmentData).EndTime)" Step="@(interval / slotCount)"></SfDateTimePicker> </td> </tr> </tbody> </table> </EditorTemplate> </ScheduleTemplates> </SfSchedule>
@code { private int interval = 60; private int slotCount = 4; } |
Regards,
Ravikumar Venkatesan
Yep. That was exactly what I was missing. Thank you for your help!
Cosmin,
You are welcome. Let us know if you need any other assistance.