Buy a license to get a bundle of fast scheduling components with source code.

License

Licensed for testing and evaluation purposes. Please see the license agreement included in the sample project. You can use the source code of the tutorial if you are a licensed user of DayPilot Pro for JavaScript. Buy a license.

We have also used "asp-append-version" attribute to include a build-specific string. This will ensure that the current version of daypilot-all.min.js will be loaded by the browser (instead of any previous version that might be cached).

Again, a simple implementation that generates the resources directly but you can easily replace it with data loaded from a database.

DateTime Format in JSON Responses

By default, ASP.NET Core serializes DateTime object including current time zone data. In our example we need to avoid that because the Scheduler works with an idealized time zone and the dates would be shifted when displayed.

We can configure the ASP.NET Core JSON serializer not to include the time zone data by modifying the ConfigureServices() method in Startup.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
namespace AspNetCoreScheduler
{
public class Startup
{
// ...
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc().AddJsonOptions(options =>
{
options.SerializerSettings.DateTimeZoneHandling = DateTimeZoneHandling.Unspecified;
});
}
// ...
}
}