NodaTimePicker 0.5.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package NodaTimePicker --version 0.5.1                
NuGet\Install-Package NodaTimePicker -Version 0.5.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NodaTimePicker" Version="0.5.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NodaTimePicker --version 0.5.1                
#r "nuget: NodaTimePicker, 0.5.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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

Nuget (with prereleases) Nuget Build Status CodeFactor

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 />

DatePicker1

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();
    }
}

DatePicker1

First Day of Week

Specify any weekday as the first day of the week (default is Monday):

<DatePicker Inline=true FirstDayOfWeek=IsoDayOfWeek.Thursday />

DatePicker First Day of Week

Localization

Display day and month names in the specified culture:

<DatePicker Inline=true FormatProvider="@(new System.Globalization.CultureInfo("fr-FR"))" />

DatePicker Localization DatePicker Localization Months

Disabled Days of Week

Disable specific days of the week:

<DatePicker Inline=true DaysOfWeekDisabled=@(new IsoDayOfWeek[] { IsoDayOfWeek.Monday, IsoDayOfWeek.Wednesday }) />

DatePicker Disabled Days of Week

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.7.0 18,422 2/12/2020
0.6.1 3,922 11/15/2019
0.6.0 338 11/8/2019
0.5.2 368 10/19/2019
0.5.1 329 10/18/2019
0.5.0 1,658 9/17/2019
0.4.2 360 9/15/2019
0.4.1 493 9/15/2019
0.4.0 592 9/11/2019
0.3.0 512 9/6/2019
0.1.0 541 6/21/2019