BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
@Html.EJ().DatePicker("STartDate").DateFormat("dd/MM/yyyy").Value(ViewBag.StartDate) it works
and when I do this
@Html.EJ().DatePicker("StartDate").DateFormat("dd/MM/yyyy").ClientSideEvents(s => s.Select("onStartDate")) it works
but when I do this
@Html.EJ().DatePicker("StartDate").DateFormat("dd/MM/yyyy").Value(ViewBag.StartDate).ClientSideEvents(s => s.Select("onStartDate"))
I get an error Cannot use a lambda expression as an argument to a dynamically dispatched operation without first casting it to a delegate or expression tree type.
what I want to do is have the date picker open with a value that I give it and if the user changes it fire the client side event is this possible
thanks
andrew
[cshtml] var dateValue=(string)ViewBag.StartDate; @Html.EJ().DatePicker("StartDate1").Value(dateValue).ClientSideEvents(e => e.Change("onStartDate")) |
[cshtml] @Html.EJ().DatePicker("StartDate2").DateFormat("dd/MM/yyyy").ClientSideEvents(s => s.Select("onStartDate")).Value(ViewBag.StartDate) |