NodaTimePicker 0.5.1
See the version list below for details.
dotnet add package NodaTimePicker --version 0.5.1
NuGet\Install-Package NodaTimePicker -Version 0.5.1
<PackageReference Include="NodaTimePicker" Version="0.5.1" />
paket add NodaTimePicker --version 0.5.1
#r "nuget: NodaTimePicker, 0.5.1"
// Install NodaTimePicker as a Cake Addin #addin nuget:?package=NodaTimePicker&version=0.5.1 // Install NodaTimePicker as a Cake Tool #tool nuget:?package=NodaTimePicker&version=0.5.1
NodaTimePicker
A Date/Time picker for Blazor, using NodaTime.
View the Demo
The aim of this project is to develop Date/Time picker components for Blazor applications, using NodaTime as the only dependency for Date and Time calculations, and CSS Grid for layout.
It is inspired by the very successful Javascript Date/Time picker developed by TempusDominus, though any dependencies on Bootstrap or jQuery have been removed - it is not simply a port of the code or interop, but a fresh start from a zero base.
Getting Started
Requirements
The easiest way to get started is to look at the Demo project, which has samples for most of the functionality.
The library can be downloaded from NuGet by searching for: NodaTimePicker in NuGet Package Manager, or by executing the following command in the Package Manager Console:
PM> Install-Package NodaTimePicker -Version 0.5.1
When using the component, you must add a using statement for NodaTime:
@using NodaTime
Inline
To display a simple inline DatePicker, use the following code:
<DatePicker Inline=true />
Bound to Input
To bind a DatePicker to an Input element, use Blazor event bindings:
<input type="text" @onfocus=@focussed />
<DatePicker Visible=@visible Selected=@selected />
@functions
{
bool visible = false;
void focussed(UIFocusEventArgs e)
{
visible = true;
}
void selected(LocalDate localDate)
{
visible = false;
StateHasChanged();
}
}
First Day of Week
Specify any weekday as the first day of the week (default is Monday):
<DatePicker Inline=true FirstDayOfWeek=IsoDayOfWeek.Thursday />
Localization
Display day and month names in the specified culture:
<DatePicker Inline=true FormatProvider="@(new System.Globalization.CultureInfo("fr-FR"))" />
Disabled Days of Week
Disable specific days of the week:
<DatePicker Inline=true DaysOfWeekDisabled=@(new IsoDayOfWeek[] { IsoDayOfWeek.Monday, IsoDayOfWeek.Wednesday }) />
Additional Features
- Min/Max selectable date
- Specifit disabled dates
- Disable specified date intervals
- Custom header formats
- Show/Hide action buttons
Future Development
- Time picker
- Date+Time picker
- Date range picker
- Date+Time range picker
- Week picker
- Month picker
- Year picker
- Support for different calendars
- Timezone awareness
- Locale support
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.AspNetCore.Components (>= 3.1.0-preview1.19508.20)
- Microsoft.AspNetCore.Components.Web (>= 3.1.0-preview1.19508.20)
- NodaTime (>= 3.0.0-beta01)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.