Telerik Forums
UI for ASP.NET Core Forum
1 answer
23 views

Hi there,

After updating to version 2023.3.1114, I found that the calendar at Kendo UI Date Range Picker won't closed automatically after selecting the start and end date. This happened particularly when I change the max date inside the "Change" Event.

$("#date-range-picker").data("kendoDateRangePicker").max(new Date(2024, 1, 14));

I was able to replicate the issue at Kendo UI JQuery dojo: https://dojo.telerik.com/UfOcUZaY/3

However the issue can't be replicated at the following REPL: https://netcorerepl.telerik.com/?_gl=1*12uzyp6*_ga*ODY4MDY0MTk4LjE3MDY0NzY2ODc.*_ga_9JSNBCSF54*MTcwNjQ3NjY4Ni4xLjEuMTcwNjQ3NzM2NC44LjAuMA..*_gcl_au*MTM5NDI2ODE3Ny4xNzA2NDc2Njg3

Turned out the page still using version 2023.3.1010.

Is this change intended?

Is there a workaround? I have tried to close the calendar manually after checking if the range.start and range.end available. But didn't quite work well. It may close the calendar even if I only select the start date.

Appreciate your support. Thank you.

Ivan Danchev
Telerik team
 answered on 31 Jan 2024
1 answer
52 views

I'm having problem setting culture in a calendar called from Grid.
Below is my sample:

<script>
     kendo.culture("@Model.userSetting.culture");
</script>

....

       @(Html.Kendo().Grid<MyProject.Model.ModelName>()
                        .Name("gTasks")
                        .Columns(columns =>
                        {
                            columns.Bound(p => p.Id).Width(100).Visible(false);
                            columns.Bound(p => p.taskID).Width(100).Visible(false);
                            columns.Bound(p => p.Start).Format("{0:" + Model.userSetting.dateFormat + "}").Sortable(true).Width(100).Title("Start").EditorTemplateName("GridCalendarTemplate");
                            columns.Bound(p => p.End).Format("{0:" + Model.userSetting.dateFormat + "}").Sortable(true).Width(100).Title("End").EditorTemplateName("GridCalendarTemplate");
                         })
)

....



   

 

In Views/Shared/EditorTemplates/GridCalendarTemplate.cshtml


@model DateTime?
@{
    var culture = Context.Session.GetString("culture");

}
<script>
    kendo.culture("@culture");
</script>
@(Html.Kendo().DatePickerFor(m => m)
    .Culture("@culture")
    .HtmlAttributes(new { title = Html.ViewContext.ViewData.TemplateInfo.GetFullHtmlFieldName("") }))
Unfortunately, the calendar format does not accept culture "pl-PL"
Jacek
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 21 May 2023
1 answer
59 views

Is it possible to display a kendo-chart inside of a kendo-schedule for each day in a monthview?

I am attempting to use the template "<script id="event-template" type="text/html"></script>" and setting ".EventTemplateId("event-template")".

Inside the template, I only want to dynamically change the series data of the kendo-chart for each day.

So far, only the first event displays a chart successfully even though there are other days with event data.

Are there any examples of something like this?

Mihaela
Telerik team
 answered on 25 Oct 2022
1 answer
74 views
We are trying to use the @(Html.Kendo().Scheduler<myModel>() in Asp.net.

When I use Server Binding, and when my calendar page first displays, the tasks display in the calendar as expected.
Here is my Invoke method:
public async Task<IViewComponentResult> InvokeAsync()
List<myModel> myTasks = GetTasksfortheMonth();
return View(myTasks); //These display on calendar as expected

But when I switch months, I want to call the Read() method again to get that months data.
So I switched to using AJAX Binding.
Now when my calendar first displays or whenever I change months, my controller methods is called(below). But the tasks don't display in the calendar.

How do I get my tasks to display in the calendar when using AJAX binding?

My .cshtml
@Html.Kendo().Scheduler<myModel>()
....
.EventTemplate(
"<div class='movie-template'>" +
"<p>" +
"<h3> Title: #= title #</h3>" +
"</p>" +
"</div>")
.DataSource(d => d
.Model(m =>
{
m.Field(f => f.Title).DefaultValue("No title");
m.Field(f => f.Description).DefaultValue("no desc");
})
.Read("Read", "MyController") //this calls my controller method but no tasks appear in calendar
)
//.BindTo(Model)  //Works for Server Binding, tasks appear in calendar when page renders first time

My Controller method:
public virtual JsonResult Read([DataSourceRequest] DataSourceRequest request)
{
List<myModel> myTasks = GetTasksfortheMonth();
return Json(myTasks.ToDataSourceResult(request));
}
Aleksandar
Telerik team
 answered on 25 Oct 2022
4 answers
145 views
I want to use the calendar to display multiple dates that have an event occurrence but I do not want the user to be able to select any dates.  Is there a way to make the calendar read only or disabled?
Mihaela
Telerik team
 answered on 16 Apr 2021
3 answers
129 views

Hi, collegues

 

i do simple test multilanguage site and has possible trouble: use pl culture and calendar display dates in format dd.MM.yyyy. But ASP.Net Core 3.1 with Polish culture dont accept values in this format for DateTime.TryParse. Look at kendo.culture.pl.min.js and found format section:

patterns: { 
  d: "dd.MM.yyyy",
  D: "dddd, d MMMM yyyy", 
  F: "dddd, d MMMM yyyy HH:mm:ss", 
  g: "dd.MM.yyyy HH:mm",
  G: "dd.MM.yyyy HH:mm:ss",
  m: "d MMMM", 
  M: "d MMMM", 
  s: "yyyy'-'MM'-'dd'T'HH':'mm':'ss", 
  t: "HH:mm", 
  T: "HH:mm:ss", 
  u: "yyyy'-'MM'-'dd HH':'mm':'ss'Z'", 
  y: "MMMM yyyy", 
  Y: "MMMM yyyy" 
}

but simple test with net console display for me:
Format:d, value: 2021-02-05
Format:D, value: 5 lutego 2021
Format:F, value: 5 lutego 2021 17:17:07
Format:g, value: 2021-02-05 17:17
Format:G, value: 2021-02-05 17:17:07
Format:m, value: 5 lutego
Format:M, value: 5 lutego
Format:s, value: 2021-02-05T17:17:07
Format:t, value: 17:17
Format:T, value: 17:17:07
Format:u, value: 2021-02-05 17:17:07Z
Format:y, value: luty 2021
Format:Y, value: luty 2021

I'm found this text: Poland adopted the ISO 8601 standard for date format in official, especially electronic, communication in 2002. For everyday usage and for less official papers, however, the traditional formats d.m.[yy]yy or dd.mm.[yy]yy (i.e., 7.8.2008, 07.08.2008, 07.08.08) are very common in Poland because of speaking order: "day month year".

I think, we have inconsistent behaviour in client and server parts.

 

 

PS I'm not Polish and can't told which format is correct.

Sincerelly yours,

Anton Mironov
Telerik team
 answered on 11 Feb 2021
1 answer
36 views
Hello. I am new at using Calendar for ASP.NET Core.
in my project every month has 6 weeks. And the last week in every month is empty. How can I delete this week?
Eyup
Telerik team
 answered on 12 Mar 2019
1 answer
118 views
Please guide me to disable both weekends and holidays in calendar widget
Viktor Tachev
Telerik team
 answered on 31 Jan 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?