i am getting the error when i use @html.kendo()
it showing are you missing any directives
>please suggest any solution
In some odd user-cases it is handy not to show the selected range inside the calendar when it shows up.
Case: Lets say you have a range already selected. Then you click the current start-date in the calendar which pops up. Further you click a new date back in time. This sets a new start date instead of selecting the end-date. The combination of actions requires 3 clicks to set the new range.
If the user unfortunately clicks on the start-date, it's not obvious to some people that the next date you select is still a start-date, unless you are aware that the controller does not select ranges backward in the calendar.
Since you would have a start and end date, how do you set up the control for DateRangePickerFor to bind to 2 fields.
I really like the 2 calendar view with the DateRange Picker but struggling on how to wire up the binding for the post back to the controller.
Thanks
Peter
Found a similar question here: https://www.telerik.com/forums/datarangepicker-label-localization
So I know, this element is new to Kendo UI and the localization files aren't completed. The difference to the post is, I'm using MVC. Is it possible to modify the missing localization values through razor? Or directly change the "Start" and "End" messages?
If not, how can I implement the solution in the other thread? Or are there other solutions?
Before someone is asking. The localization for other elements works properly:
<script src="https://kendo.cdn.telerik.com/2020.1.219/js/cultures/kendo.culture.de-DE.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2020.1.219/js/messages/kendo.messages.de-DE.min.js"></script>
I am trying to use the DateRangePicker in Telerik for ASP.NET MVC. I am using the latest version of Telerik and ASP.NET MVC. However, I get the following error, both in the editor and at runtime (so it's not an Intellisense issue):
Kendo.Mvc.UI.Fluent.WidgetFactory<
System.Collections.Generic.List
<KPIView_MVC.Models.KPIData>> does not contain a definition for 'DateRangePicker' and no extension method 'DateRangePicker' accepting a first argument of type Kendo.Mvc.UI.Fluent.WidgetFactory<
System.Collections.Generic.List
<KPIView_MVC.Models.KPIData>> could be found
How can I get it to work correctly?
Hello, I was wondering if it was possible to to the use DateRangePicker for selecting a range of months instead of days. I currently have the following code:
@(Html.Kendo().DateRangePicker()
.Name("MonthlyDatePicker")
.HtmlAttributes(new { style = "width: 100%" })
.Events(e => e.Change("onMonthlyChange"))
.Start("year")
.Depth("year")
.Format("MM yyyy")
)
This code appears the way I want it to but does not allow the user to select a month. Any help is much appreciated. Thanks
Current Month August:
@(Html.Kendo().DateRangePicker()
.Name("daterangepicker3")
.Format("MM/dd/yyyy")
.Range(r => r.Start(DateTime.Now.AddMonths(-1)).End(DateTime.Now.AddMonths(-1).AddDays(10)))
.HtmlAttributes(new { style = "width: 100%", title = "daterangepicker3" })
)
When the default Range is last month, clicking the date boxes, shows August, not July where the highlighted range is. Is there away to set the start month?
Hi!
I ve been checking out the new DateRangePicker control, and i had some doubts about its usage
1) Is there a chance to make the end date optional? the demo published always focuses on the end date input after selecting a start date, and i want it to be optional, by that i mean to be able to select a start date and end date, o only one of them and the remaining date field to remain empty. Is that possible?
2) I havent seen any binding method like there is for the date picker control. In the latest, there is a DatePickerFor method, to bind the control to the viewmodel field. In the daterangepicker control i expected to be the same method (configuring the start date field and the end date field)... where my assumptions wrong? If thats the case i dont see too much use to this control :/
thanks!