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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Create Appointment dialog when "All Day" checked does not post dates

Thread ID:

Created:

Updated:

Platform:

Replies:

128016 Dec 27,2016 08:30 AM UTC Jan 2,2017 05:07 AM UTC ASP.NET Core 3
loading
Tags: Schedule
Yaroslav
Asked On December 27, 2016 08:30 AM UTC

Seems to be problems in ej.web.all.min.js 14.4.0.15, because same issue reproduces in MVC5.

Using this sample code in view:
[code]
@{
    Html.EJ().Schedule("lessons")
             .Width("100%")
             .Height("525px")
             .CurrentDate(DateTime.Now)
             .CurrentView(CurrentView.Month)
             .Views(new List<string> { "day", "week", "month" })
             .AgendaViewSettings(x => x.DaysInAgenda(7))
             .AllowDragAndDrop(true)
             .AllowDragDrop(true)
             .AllowKeyboardNavigation(true)
             .EnableAppointmentNavigation(false)
             .EnableAppointmentResize(true)
             //.EnableLoadOnDemand(true)
             .EnableRecurrenceValidation(true)
             .EnableResize(true)
             .FirstDayOfWeek(DayOfWeek.Monday)
             .IsResponsive(true)
             .Locale("ru-RU")
             .MinDate(DateTime.Now.AddMonths(-1))
             .MaxDate(DateTime.Now.AddMonths(3))
             .Orientation(Orientation.Vertical)
             .ReadOnly(false)
             .ShowDeleteConfirmationDialog(true)
             .ShowCurrentTimeIndicator(true)
             .ShowLocationField(false)
             .ShowHeaderBar(true)
             .ShowNextPrevMonth(true)
             .ShowQuickWindow(true)
             .ShowTimeZoneFields(false)
             .TimeMode(TimeMode.Hour24)
             .TimeZone("GMT +03:00")
             .WorkHours(wh => wh.Start(8).End(23).Highlight(true))
             .ContextMenuSettings(x => x.Enable(true))
             .CategorizeSettings(x => x.Enable(false))
             //.CategorizeSettings(x => x.Enable(true)
             //                          .AllowMultiple(true)
             //                          .Datasource(ds => ds.Adaptor(AdaptorType.UrlAdaptor).URL("Schedule/GetCategories"))
             //                          .Id("Id").Text("Text").Color("Color").FontColor("FontColor")
             //                   )
             //.Resources(res =>
             //{
             //    res.Field("RoomId").Title("Room").Name("Room").AllowMultiple(false)
             //       .ResourceSettings(flds => flds.Datasource(ds => ds.Adaptor(AdaptorType.UrlAdaptor).URL("Schedule/GetRooms"))
             //                                 .Text("Text").Id("Id").GroupId("GroupId").Color("Color")).Add();
             //    res.Field("TutorId").Title("Tutor").Name("Tutors").AllowMultiple(true)
             //        .ResourceSettings(flds => flds.Datasource(ds => ds.Adaptor(AdaptorType.UrlAdaptor).URL("Schedule/GetTutors"))
             //                                 .Text("Text").Id("Id").GroupId("GroupId").Color("Color")).Add();
             //})
             .AppointmentSettings(fields => fields.Datasource(ds => ds.Adaptor(AdaptorType.WebApiAdaptor)
                                                                      .URL("Schedule/api")
                                                                      .BatchURL("Schedule/BatchAppointments")
                                                                      .InsertURL("Schedule/AddAppointments")
                                                                      .UpdateURL("Schedule/UpdateAppointments")
                                                                      .RemoveURL("Schedule/RemoveAppointments")
                                                             )
                                                  .Id("Id")
                                                  .Subject(field => field.Field("Subject").ValidationRules(v => v.AddRule("required", true)))
                                                  .StartTime("StartTime")
                                                  .StartTimeZone("StartTimeZone")
                                                  .EndTime("EndTime")
                                                  .EndTimeZone("EndTimeZone")
                                                  .Description(field => field.Field("Description").ValidationRules(v => v.AddRule("required", true)))
                                                  .Location("Location")
                                                  .AllDay("AllDay")
                                                  .Priority("Priority")
                                                  .Categorize("Categorize")
                                                  //.Categorize(field => field.Field("Categorize").ValidationRules(v => v.AddRule("required", true)))
                                                  .Recurrence("Recurrence")
                                                  .RecurrenceRule("RecurrenceRule")
                                                  .RecurrenceId("RecurrenceId")
                                                  .RecurrenceExDate("RecurrenceExDate")
                                 //.ResourceFields(x =>
                                 //{
                                 //    x.Field("RoomId").ValidationRules(val => val.AddRule("required", true));
                                 //    x.Field("TutorId").ValidationRules(val => val.AddRule("required", true));
                                 //})
                                 )
             .Render();
}
[/code]

when i click on empty cell then enter something into subj and click "Create Appointment" this JSON posted to API:
[code]
{"ParentId":1,"AppTaskId":1,"Id":1,"Subject":"fghf","StartTime":"2016-11-30T21:00:00.000Z","EndTime":"2016-12-01T20:59:59.000Z","AllDay":true,"Recurrence":false,"Guid":"f869a196-e217-8e8a-74c5-23787b673146"}
[/code]

In this case Start\End Time is not null. But when i do exact same thing using "Edit" dialog POST data will lack Start\End time so its impossible to determine appointment date
[code]
--batch_74c7b2bc-3227-41ab-b3f4-e5edd38f5b84
Content-Type: multipart/mixed; boundary=changeset_1e631c55-893b-4e05-b4f1-6b6b23087dff

--changeset_1e631c55-893b-4e05-b4f1-6b6b23087dff
Content-Type: application/http
Content-Transfer-Encoding: binary

POST undefined HTTP/1.1
Accept: application/json;odata=light;q=1,application/json;odata=verbose;q=0.5
Content-Id: 0
Content-Type: application/json; charset=utf-8

{"Subject":"dvddvsd","Id":1,"AllDay":true,"Recurrence":false,"Description":"dfsdfsd","StartTimeZone":"GMT +03:00","EndTimeZone":"GMT +03:00","StartTime":null,"EndTime":null,"Guid":"f01db398-88e1-b500-aafa-6ecbc3470532","AppTaskId":1,"ParentId":1}

--changeset_1e631c55-893b-4e05-b4f1-6b6b23087dff--
--batch_74c7b2bc-3227-41ab-b3f4-e5edd38f5b84--
[/code]

Sellakumar [Syncfusion]
Replied On December 28, 2016 06:27 AM UTC

Hi Yaroslav, 
  
Thanks for contacting Syncfusion support. 
  
We have checked with the sample code which you shared with us and suspect that the problem might be due to the value passed to the TimeZone property. For the TimeZone property, invalid value is mapped which is the cause of this issue. We have processed it based on the Coordinated Universal Time (UTC). 
  
<code> 
  
    .TimeZone("GMT +03:00") 
    .TimeZone("UTC +03:00") 
  
</code> 
  
Kindly make use of the above value and let us know, if it solves your problem or else you need any further assistance on this. 
  
Regards, 
Sellakumar K

Yaroslav
Replied On December 28, 2016 08:45 AM UTC

Many thanks, problem now resolved

Karthigeyan Krishnamurthi [Syncfusion]
Replied On January 2, 2017 05:07 AM UTC

Hi Yaroslav, 
  
We are glad to know that your issue has been fixed. 
 
Kindly let us know, if you need any further assistance. 
 
 
Regards, 
Karthigeyan 


CONFIRMATION

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.

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

;