Telerik Forums
UI for ASP.NET MVC Forum
1 answer
15 views

Can we change the starting day of the week from Sunday to Monday? i.e. MO, TU, WE, TH, FR, SA, SU

Or Sunday to Saturday? i.e. SA, SU, MO, TU, WE, TH, FR

Instead of the current: SU, MO, TU, WE, TH, FR, SA

Mihaela
Telerik team
 answered on 28 Feb 2024
1 answer
9 views
Is it possible to make it so if a user clicks a day it selects the whole week, like clicking the week number does? Then is it also possible to capture multiple selected weeks (not necessarily concurrent weeks or in the same month), even if all the dates in those selected weeks are the output that would be fine
Ivan Danchev
Telerik team
 answered on 28 Feb 2024
0 answers
22 views

I am using a Kendo.Filter object like the following to filter results in a Kendo Grid:

@(Html.Kendo().Filter<CustomPersonClass>() .Name("personFilter") .DataSource("peopleDS") .ApplyButton(false) .Fields(f => {

f.Add(p => p.LastName).Label("Last Name");
         f.Add(p => p.FirstName).Label("First Name");
         f.Add(p => p.MiddleName).Label("Middle Name");

f.Add(p => p.StartDate).Label("Start Date").Operators(o => o.Date(d => d.Eq("Is equal to").Gte("Greater than equal").Lte("Less than equal"))); }) )

 I have helper code to handle the toolbar in my Kendo Grid like the following, :

@helper ToolbarTemplate()
{
    <button class="k-button k-button-solid k-button-solid-base" id="applyFilter"><span class="k-icon k-i-filter"></span>Apply Filter</button>
    <button class="k-button k-button-solid k-button-solid-base" id="clearFilter">Reset</button>
    <button class="k-button k-grid-excel k-button-solid k-button-solid-base"><span class="k-icon k-i-excel"></span>Export to Excel</button>
}

I also have some JavaScript in a function to apply the filter when the Apply Filter button is clicked, as seen here:

$("#applyFilter").click(function (e) {
    //e.preventDefault();
    var myFilter = $("#personFilter").getKendoFilter();
    localStorage["kendo-person-filter-options"] = kendo.stringify(myFilter.getOptions().expression);
    myFilter.applyFilter();
});

 

The problem I am having is if I enter an invalid Leap Year date (e.g. 2/29/2003, since 2023 didn't have a February 29th), I get no data back; however, if I enter a valid Leap Year (e.g. 2/29/2004), my Kendo Grid will show data.  Is there a way to validate the date that is being entered manually into a DatePicker field used for filtering?  That is, if I use the DatePicker, it will not show me 2/29/2003 as an option, but if I type in 2/29/2003 and click Apply Filter, it doesn't throw any kind of error about 2/29/2003 being invalid.

1 answer
21 views

Hello,

for a new project we're considering ASP.NET MVC, or React (Kendo React)

 

We like to create a scheduler with multiple users next to each other, per day.

In attachment is an drawing of the expected result.

Is this feasable with Telerik Scheduler, with drag and drop availabilities to move appointments between users?

Thanks,

 

Jeroen

Georgi
Telerik team
 answered on 26 Dec 2023
2 answers
125 views

     I am using this:  

 

@(Html.Kendo().MultiViewCalendar().Name("calendar").Views(3).ShowViewHeader().Min(new DateTime(2020, 7, 1)).Max(new DateTime(2020, 9, 30)).Events(e => e.Change("change"))
            )

 

and I simply want to highlight/change background color of a few days in a list in my model.  Is there a simple way of doing that?

Nikolay
Telerik team
 answered on 09 Mar 2020
3 answers
375 views
Hi,I have a problem with data binding using a custom template for the editor for the Scheduler component.When double clicking an item in the scheduler my dialog is displayed, for for some reason, I am only able to databind against the properties of the ISchedulerEvent interface and not all the other properties of my ViewModel.ViewModel

Example:
public class MyViewModel : ISchedulerEvent
    {   
        buplic int MyId { get; set;}  
        public bool MyBool{ get; set;}
        public string MyString { get; set; }
        #region ISchedulerEvent
        public string Title { get; set; }
        public string Description { get; set; }
        public bool IsAllDay { get; set; }
        public DateTime Start {get;set;}
        public DateTime End { get; set; }
        public string StartTimezone { get; set; }
        public string EndTimezone { get; set; }
        public string RecurrenceRule { get; set; }
        public string RecurrenceException { get; set; }
        #endregion
}
-----------
View Example:
@(Html.Kendo().Scheduler<MyViewModel>()
      .Name("MyScheduler")
      .Date(DateTime.Today)
      .StartTime(DateTime.Today)
      .EndTime(DateTime.Today.AddYears(1))
      .Views(views =>
      {
          views.DayView();
          views.WeekView(weekView => weekView.Selected(true));
          views.MonthView();
      })
      .DataSource(d =>
      {
          d.Read(read => read.Url("/MyController/MyRead"));
          d.Update(update => update.Url("/MyController/MyUpdate"));
          d.Create(create => create.Url("/MyController/MyCreate"));
          d.Destroy(destroy => destroy.Url("/MyController/MyDelete"));
          d.Model(model =>
          {
              model.Id(f => f.MyId);
          });
      })
      .BindTo(new [] {
                    new ServiceWindowViewModel{
                        MyId = 1,
      MyBool = true,
      MyString = "Yay this is my string",
      
      Title = "title not used",
                        Description = "description not used",
                        End = DateTime.Now.AddHours(2),
                        EndTimezone = null,
                        IsAllDay = false,
                        RecurrenceException = null,
                        RecurrenceRule = null,
                        Start = DateTime.Now,
                        StartTimezone = null
                    }
                })     
      .Editable(editable => {
          editable.Confirmation(true);
          editable.Create(true);
          editable.Destroy(true);
          editable.Resize(true);
          editable.Update(true);
          editable.TemplateId("editor");
        })
    )<script id="editor" type="text/x-kendo-template">
<div class="k-edit-label"><label for="title">Title</label></div>
<div class="k-edit-field" data-container-for="title"><input type="text" class="k-input k-textbox" name="title" data-bind="value: title"></div>
<BR>   
<div class="k-edit-label"><label for="mystring">My String</label></div>
<div class="k-edit-field" data-container-for="mystring"><input type="text" class="k-input k-textbox" name="mystring" data-bind="value: mystring"></div>
</script>
-----------
Now My String editor box is displayed correctly... but the data is not displayed from the property of the view model... what am I doing wrong?Is there some other way to configure a custom edit popup for the Scheduler item? E.g. the editor for the grid seem to work better and is able to display all properties of my ViewModel correctly.Thanks,
Michael
Veselin Tsvetanov
Telerik team
 answered on 10 Apr 2018
2 answers
281 views

When I am using the calendar it is very small and I would like to expand it to fit the entire page width

 

Here is the code I am using:

 

<div style="text-align:center;">
    @(Html.Kendo().Calendar()
.Name("calendar")
)
</div>

 I am not sure if it would be in the css or if I can use the inline styling


Max
Top achievements
Rank 2
 answered on 27 Nov 2017
3 answers
82 views

Hey guys ,

 When there is a scheduler with options:

 max:date....

selectable:true

if we move a cell down with keyboard and we reach a cell greater then max then scheduler block .

Ivan Danchev
Telerik team
 answered on 10 Jul 2017
1 answer
30 views

So, I've been spending roughly a day extra coding javascript and testing my code only to find that the date in data-value of the td elements are one month behind.

I'm posting a screenshot. now my question is, is this considered a bug? it's not hard for me to compensate for this, but I'd hate to change it again after a brief bug fix patch. please get back to me on this.

Viktor Tachev
Telerik team
 answered on 27 Jul 2016
4 answers
117 views

Hi, I'm new here.

 

I'm developing a site which uses the Calendar, one requirement is that I need to be able to color the days of the month depending on the model state.

 

I've seen a couple of examples that has the Calendar declared in javascript, I'm working with Razor, in a .cshtml file. I can freely access a property in the model to return a CssClass string.

my calendar is written like this.

@(Html.Kendo().Calendar()
                  .Name("Trafikkalender")
                  .Culture("sv-SE")
                  .HtmlAttributes(new {style = "width: 100%;"})
                  .Events(e => e.Change("DateClick").Navigate("Navigate"))
                  .Format("dd MM yyyy")
                  
                  )

I know I need the .MonthTemplate("") property for my purpose, but I don't know what the syntax is for the string. the Model object returns a custom date object with a DateTime as input, how would I accomplish my goal? the examples and demos I've found here are very poorly commented/explained, I need more information.

Viktor Tachev
Telerik team
 answered on 27 Jul 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?