We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Custom appointment dialog with date-time-picker

Thread ID:





130923 Jun 11,2017 05:10 PM UTC Jun 12,2017 07:04 AM UTC ASP.NET Core 1
Tags: Schedule
Asked On June 11, 2017 05:10 PM UTC

Hi Support:

We need to create a custom dialog but using a ej-time-picker to select the time rather than using the ej-date-time-picker that embed date and time.

We need to do this because the ej-date-time-picker does not have a min-time and max time properties. 

Do you have a sample of how we can use the ej-date-picker and ej-time-picker in order to save at the end the appointtime datetime in one db field.

For example how we are going to combine the date a and time after a user provide these values.



Karthigeyan Krishnamurthi [Syncfusion]
Replied On June 12, 2017 07:04 AM UTC

Thank you for contacting Syncfusion support. 
We have prepared the sample to both Date and Time picker separately instead DateTime picker which can be download from the below location. 
Kindly refer the below code example used in the sample. 
function onAppointmentWindowOpen(args) { 
    args.cancel = true; 
    $("#StartDate").ejDatePicker({ value: ej.format(args.startTime, this._datepattern(), this.model.locale) }); 
    $("#EndDate").ejDatePicker({ value: ej.format(args.endTime, this._datepattern(), this.model.locale) }); 
    $("#StartTime").ejTimePicker({ value: ej.format(args.startTime, this._pattern.t, this.model.locale) }); 
    $("#EndTime").ejTimePicker({ value: ej.format(args.endTime, this._pattern.t, this.model.locale) }); 
    if (!ej.isNullOrUndefined(args.target)) { 
        if ($(args.target.currentTarget).hasClass("e-alldaycells") || this._allDay) { 
            $("#allday").prop("checked", true); 
            args.model.currentView == "month" ? $("#allday").prop("checked", true) : $("#allday").prop("checked", false); 
        $("#StartTime,#EndTime").ejTimePicker({ enabled: ($(args.target.currentTarget).hasClass("e-alldaycells") || $(args.target.currentTarget).hasClass("e-monthcells") || args.model.currentView == "month") ? false : true }); 
    if (!ej.isNullOrUndefined(args.appointment)) { 
        $("#StartDate").ejDatePicker({ value: ej.format(args.appointment.StartTime, this._datepattern(), this.model.locale) }); 
        $("#EndDate").ejDatePicker({ value: ej.format(args.appointment.EndTime, this._datepattern(), this.model.locale) }); 
        $("#StartTime").ejTimePicker({ value: ej.format(args.appointment.StartTime, this._pattern.t, this.model.locale) }); 
        $("#EndTime").ejTimePicker({ value: ej.format(args.appointment.EndTime, this._pattern.t, this.model.locale) }); 
        $("#allday").prop("checked", args.appointment.AllDay); 
        $("#recurrence").prop("checked", args.appointment.Recurrence); 
        if (args.appointment.Recurrence) { 
            $("tr.recurrence").css("display", "table-row"); 
    if (this._allDay) alldayCheck(); 



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon