[]
The following quick start guide is intended to get you up and running with the TimeEditor control. In this quick start, you'll start with creating a new application, add the C1TimeEditor control to it, configure the C1TimeEditor control and display today's date and time on it.
type=note
Note: Blazor Server App or server-side app can be created using the Blazor Server App template. For more details, see Blazor Server topic under Blazor Project Types.
In the Solution Explorer, right click Dependencies and select Manage NuGet Packages.
In NuGet Package Manager, select nuget.org as the Package source.
Search for C1.Blazor.DateTimeEditors package and click Install.
Navigate to the wwwroot, open index.html file.
Register the client resources by adding the following lines of code to the <head> tag.
<link rel="stylesheet" href="/_content/C1.Blazor.Core/styles.css" />
<link rel="stylesheet" href="/_content/C1.Blazor.Calendar/styles.css" />
<link rel="stylesheet" href="/_content/C1.Blazor.DateTimeEditors/styles.css" />
<link rel="stylesheet" href="/_content/C1.Blazor.Input/styles.css" />
Add the following code to the <body> tag.
<script src="/_content/C1.Blazor.Core/scripts.js"></script>
<script src="/_content/C1.Blazor.Calendar/scripts.js"></script>
<script src="/_content/C1.Blazor.Input/scripts.js"></script>
Right click on Pages folder, click Add | Razor Component to add a new Razor page and then provide a name, say TimeEditorQuickStart.
Display the current time in the TimeEditor control by simply using the Value property of the C1TimeEditor class as shown in the following code:
@page "/TimeEditor/Index"
@using C1.Blazor.DateTimeEditors
@using C1.Blazor.DateTimeEditors.EventArgs
@using C1.Blazor.DateTimeEditors.Views
@using C1.Blazor.Input
@using C1.Blazor.Core
<C1TimeEditor Value="DateTime.Now"></C1TimeEditor>