ccPro.BlazorTimePicker 1.0.2

dotnet add package ccPro.BlazorTimePicker --version 1.0.2
                    
NuGet\Install-Package ccPro.BlazorTimePicker -Version 1.0.2
                    
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="ccPro.BlazorTimePicker" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ccPro.BlazorTimePicker" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="ccPro.BlazorTimePicker" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ccPro.BlazorTimePicker --version 1.0.2
                    
#r "nuget: ccPro.BlazorTimePicker, 1.0.2"
                    
#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.
#:package ccPro.BlazorTimePicker@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ccPro.BlazorTimePicker&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=ccPro.BlazorTimePicker&version=1.0.2
                    
Install as a Cake Tool

ccPro Generic TimePicker

Version: 1.0.2
Author: ccPro


English

Overview

ccPro Generic TimePicker is a reusable Blazor component for selecting time. It supports multiple types:

  • string (nullable)
  • TimeSpan / TimeSpan?
  • TimeOnly / TimeOnly?

It works in Blazor WebAssembly and Blazor Server, fully supporting two-way binding (@bind-Value) for all types.

Features

  • Generic component using T for flexible value types
  • Supports nullable and non-nullable values
  • Bootstrap 5 compatible
  • Lightweight and easy to integrate
  • Step property controls input granularity (seconds)

Installation

Install via NuGet:

Install-Package ccPro.BlazorTimePicker

Usage Examples

String Binding

<TimePicker T="string" @bind-Value="timeString" CssClass="form-control" Step="60" />

@code {
    private string? timeString = "09:30";
}

TimeSpan Non-nullable

<TimePicker T="TimeSpan" @bind-Value="timeSpanNonNull" CssClass="form-control" Step="60" />

@code {
    private TimeSpan timeSpanNonNull = new TimeSpan(10, 15, 0);
}

TimeSpan Nullable

<TimePicker T="TimeSpan?" @bind-Value="timeSpanNullable" CssClass="form-control" Step="60" />

@code {
    private TimeSpan? timeSpanNullable = null;
}

TimeOnly Non-nullable

<TimePicker T="TimeOnly" @bind-Value="timeOnlyNonNull" CssClass="form-control" Step="60" />

@code {
    private TimeOnly timeOnlyNonNull = new TimeOnly(11, 45);
}

TimeOnly Nullable

<TimePicker T="TimeOnly?" @bind-Value="timeOnlyNullable" CssClass="form-control" Step="60" />

@code {
    private TimeOnly? timeOnlyNullable = null;
}

License

MIT License.


فارسی

معرفی

کامپوننت ccPro Generic TimePicker یک کامپوننت تایم پیکر قابل استفاده مجدد برای Blazor است که از انواع زیر پشتیبانی می‌کند:

  • string (nullable)
  • TimeSpan / TimeSpan?
  • TimeOnly / TimeOnly?

این کامپوننت در Blazor WebAssembly و Blazor Server کار می‌کند و از دوطرفه بایندینگ (@bind-Value) پشتیبانی می‌کند.

ویژگی‌ها

  • کامپوننت جنریک با T برای انواع مقدار منعطف
  • پشتیبانی از مقادیر nullable و non-nullable
  • سازگار با Bootstrap 5
  • سبک و آسان برای استفاده
  • قابلیت تنظیم Step برای دقت انتخاب زمان (بر حسب ثانیه)

نصب

از طریق NuGet نصب کنید:

Install-Package ccPro.BlazorTimePicker

نمونه استفاده

بایندینگ String

<TimePicker T="string" @bind-Value="timeString" CssClass="form-control" Step="60" />

@code {
    private string? timeString = "09:30";
}

TimeSpan غیر-nullable

<TimePicker T="TimeSpan" @bind-Value="timeSpanNonNull" CssClass="form-control" Step="60" />

@code {
    private TimeSpan timeSpanNonNull = new TimeSpan(10, 15, 0);
}

TimeSpan nullable

<TimePicker T="TimeSpan?" @bind-Value="timeSpanNullable" CssClass="form-control" Step="60" />

@code {
    private TimeSpan? timeSpanNullable = null;
}

TimeOnly غیر-nullable

<TimePicker T="TimeOnly" @bind-Value="timeOnlyNonNull" CssClass="form-control" Step="60" />

@code {
    private TimeOnly timeOnlyNonNull = new TimeOnly(11, 45);
}

TimeOnly nullable

<TimePicker T="TimeOnly?" @bind-Value="timeOnlyNullable" CssClass="form-control" Step="60" />

@code {
    private TimeOnly? timeOnlyNullable = null;
}

لایسنس

MIT License.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows 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
1.0.2 244 10/29/2025
1.0.1 216 10/29/2025
1.0.0 213 10/21/2025