Hi,
I've got my scheduler working mostly. As I'm working through my use cases I've noticed that when I create an all day event that shows on e.g. 9/29/13, the database gets a matching value for start and end that shows 9/28/2013 7:00:00 PM. I find this to be odd and confusing. Am I missing something here or is this just the way things work with the scheduler?
Also, I'm successfully using the built in dialog to add and edit events. How do I control validation on those dialogs. How do I control what fields are shown on those dialogs. E.g. I'm getting a dropdown list for EventType but not for my employeeId.
Here is the code. Thanks in advance.
I've got my scheduler working mostly. As I'm working through my use cases I've noticed that when I create an all day event that shows on e.g. 9/29/13, the database gets a matching value for start and end that shows 9/28/2013 7:00:00 PM. I find this to be odd and confusing. Am I missing something here or is this just the way things work with the scheduler?
Also, I'm successfully using the built in dialog to add and edit events. How do I control validation on those dialogs. How do I control what fields are shown on those dialogs. E.g. I'm getting a dropdown list for EventType but not for my employeeId.
Here is the code. Thanks in advance.
@(Html.Kendo().Scheduler<Shiner.ViewModels.CompanyEventVM>()
.Name(
"scheduler"
)
.Date(DateTime.Now)
.AllDaySlot(
true
)
.EventTemplateId(
"event-template"
)
.AllDayEventTemplateId(
"all-day-event-template"
)
.Events(events => events.DataBound(
"calenderBound"
))
.Editable(e =>
{
e.Create(
true
);
e.Destroy(
false
);
e.Update(
true
);
})
.Height(550)
.Views(views =>
{
views.DayView();
views.WeekView();
views.MonthView(v => v.Selected(
true
));
views.AgendaView();
})
.Timezone(
"Etc/UTC"
)
.Resources(resource =>
{
resource.Add(m => m.EventType)
.Title(
"EventType"
)
.DataTextField(
"Text"
)
.DataValueField(
"Value"
)
.DataColorField(
"Color"
)
.BindTo(
new
[] {
new
{ Text =
"PTO Request"
, Value = 1, Color =
"#6c58f0"
} ,
new
{ Text =
"Birthday"
, Value = 2, Color =
"#3a8bd8"
},
new
{ Text =
"Anniversary"
, Value = 3, Color =
"#3ba96a"
},
new
{ Text =
"Review"
, Value = 4, Color =
"#c437d3"
},
new
{ Text =
"Notation"
, Value = 5, Color =
"#ff9400"
},
new
{ Text =
"Absence"
, Value = 6, Color =
"#d2006b"
},
new
{ Text =
"Holiday"
, Value = 7, Color =
"#d8f800"
},
new
{ Text =
"Acrual"
, Value = 8, Color =
"#035607"
},
new
{ Text =
"CompanyEvent"
, Value = 9, Color =
"#0232a3"
}
});
})
.DataSource(d => d
.Model(m =>
{
m.Id(f => f.Id);
m.Field(f => f.EventType);
m.Field(f => f.EmployeeId);
m.Field(f => f.Start);
m.Field(f => f.End);
})
.Read(
"Events_Json"
,
"CompanyEvents"
)
.Update(
"UpdateCompanyEvent"
,
"CompanyEvents"
)
.Create(
"CreateCompanyEvent"
,
"CompanyEvents"
)
)
)