Telerik Forums
UI for ASP.NET MVC Forum
0 answers
72 views
I am using Visual Studio 2022 and have telerik trial downloaded. I want to use datepicker control. Where are the dlls located so i can use the control?
Charles
Top achievements
Rank 1
 asked on 25 May 2023
3 answers
170 views
we implemented one global filter for other columns (i removed the columns in below code) but we need to do add the filter to the particular column (date)

@(Html.Kendo().Grid<Model>
            ()
            .Name("Activitiesgrid")
            .Columns(columns =>
            {               

                columns.Bound(c => c.ActivityRecordCreateDate).HeaderHtmlAttributes(new { style = "font-weight: bold;font-size: 13px;" }).HtmlAttributes(new { style = "font-size: 12px" }).Width(50);
                
                columns.Bound(c => c.ActivityDate).HeaderHtmlAttributes(new { style = "font-weight: bold;font-size: 13px;" }).HtmlAttributes(new { style = "font-size: 12px" }).Width(100).Format("{0:M/d/yyyy}");
                

            })
            .ToolBar(tools => tools.Excel().Text("Export"))
            .Excel(excel => excel.AllPages(true)
        .Filterable(true)
            
            )
              .Events(events => events.ExcelExport("incompleteCOATestsGridOnExcelExportActivities"))
            .DataSource(dataSource => dataSource
            .Ajax().Model(m =>
            {
                m.Id(p => p.rowIndex);

            })
            .PageSize(0)
            .Read(read => read.Action("GetKendoActivities", "EventsActivities", new { invokedFromMainMenu = true }))
            .ServerOperation(false)            
            .Events(events=>
            {
                events.RequestStart("request_start");
                events.RequestEnd("request_end");

            })
            )
            .NoRecords()
            .Filterable(filterable => filterable
                .Extra(false)
                .Operators(operators => operators
                        .ForDate(date => date.Clear()
                        .IsEqualTo("Is equal to")
                        .IsGreaterThan("Is After")
                        .IsLessThan("Is Before")
                        .IsNull("Is empty")
                        .IsNotNull("Is not empty"))
                        )
                )
            .Sortable()
            .Pageable()
            .Selectable()
            .NoRecords(x => x.Template("<div class='empty-grid' style ='float: top'></div>"))
            .Events(events =>
            {
                //events.FilterMenuInit("CustomFilter");
                events.FilterMenuOpen("CustomFilterOpen");
            })
// .ClientTemplate("#=AssignedDateFormat(data)#")
)
Eyup
Telerik team
 answered on 19 Dec 2022
0 answers
134 views
1 answer
67 views

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.

 

Yanislav
Telerik team
 answered on 28 Apr 2022
6 answers
491 views

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

Daniel
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 16 Mar 2022
4 answers
61 views

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>

Nikolay
Telerik team
 answered on 30 Apr 2020
2 answers
237 views

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?

 

Carter
Top achievements
Rank 1
 answered on 17 Dec 2019
1 answer
303 views

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

 

Viktor Tachev
Telerik team
 answered on 27 Aug 2019
2 answers
45 views

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?

Peter
Top achievements
Rank 1
 answered on 06 Aug 2019
1 answer
461 views

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!

Viktor Tachev
Telerik team
 answered on 21 Feb 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?