Skip to content

DHTMLX/scheduler-howto-blazor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

DHTMLX Scheduler with Blazor

Backend example for DHTMLX Scheduler hosted in a Blazor Web App via JavaScript interop. The scheduler is the existing dhtmlxscheduler.js library; Blazor renders the host page, calls into JS to initialize the widget, and serves a Web API controller for CRUD.

The sample uses an in-memory event list on the server, so you can try creating, editing, deleting and recurring events without any database setup.

Features

  • Blazor interactive server app with DHTMLX Scheduler mounted through JavaScript interop
  • CRUD operations via Scheduler REST-JSON data processor
  • Dynamic loading by date range (from / to query parameters)
  • Recurring events with the rrule-based engine (Scheduler 7.1+) - full series/occurrence handling
  • Events exchanged in ISO yyyy-MM-ddTHH:mm:ss format; client uses format_date / parse_date template overrides for round-tripping
  • No external database required

Requirements

  • .NET 10 SDK
  • Visual Studio Code with the C# Dev Kit (or Visual Studio 2022)

How to run

dotnet run --project BlazorApp

Then open the URL printed in the terminal (typically http://localhost:5xxx).

Project structure

BlazorApp/
  Components/
    App.razor                 # Root app markup, styles, and script references
    Pages/Home.razor          # Scheduler host page (JS interop call)
  Controllers/
    SchedulerController.cs    # REST API for loading and saving events (in-memory)
  Models/
    SchedulerEvent.cs         # Internal event model (PascalCase)
    WebAPIEvent.cs            # DTO used by the API + scheduler requests (snake_case wire format)
  wwwroot/lib/scheduler/
    dhtmlxscheduler.js        # DHTMLX Scheduler library
    dhtmlxscheduler.css       # Scheduler styles
    scheduler.js              # Scheduler initialization, dataProcessor, format_date / parse_date overrides
  Program.cs                  # Blazor + controller pipeline
BlazorApp.sln                 # Solution file

Tutorial

A complete tutorial is available at https://docs.dhtmlx.com/scheduler/integrations/dotnet/howtostart-blazor.

License

Source code in this repository is released under the MIT License.

DHTMLX Scheduler is a commercial library - use under a valid DHTMLX license or evaluation agreement.

Useful links

About

DHTMLX Scheduler in a Blazor Web App via JS interop — REST/JSON CRUD with recurring events

Topics

Resources

Stars

Watchers

Forks

Contributors