Codecell.Component.Blazor 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Codecell.Component.Blazor --version 0.1.0                
NuGet\Install-Package Codecell.Component.Blazor -Version 0.1.0                
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="Codecell.Component.Blazor" Version="0.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Codecell.Component.Blazor --version 0.1.0                
#r "nuget: Codecell.Component.Blazor, 0.1.0"                
#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 Codecell.Component.Blazor as a Cake Addin
#addin nuget:?package=Codecell.Component.Blazor&version=0.1.0

// Install Codecell.Component.Blazor as a Cake Tool
#tool nuget:?package=Codecell.Component.Blazor&version=0.1.0                

CodecellComponent.Blazor

Custom Components for Blazor

PersianDatePicker

Features

  • Two-Way Binding
  • Dark Mode
  • Month Navigation
  • Year Navigation
  • Date Change Event Callback
  • Validation

Installation

You can download the latest version of Codecell.Component.Blazor from Github repository. To install via nuget:

Install-Package Codecell.Component.Blazor -Version 0.1.0

Install from Nuget directly.

How to use

Register Codecell Persian DatePicker Control to project container in Program.cs file:

using Codecell.Component.Blazor;

builder.Services.AddCodecellBlazor();

Add using to _imports.razor

@using Codecell.Component.Blazor.Components.PersianDatePickerComponent

Add style references

@page "/"

``` Html
<link href="_content/Codecell.Component.Blazor/codecell.css" rel="stylesheet" />

Usage Sample

@page "/"

<PageTitle>Home</PageTitle>

<h1>Hello, world!</h1>


<div class="row" style="direction:rtl">
    <div class="col-md-4 mt-3">
        <PersianDatePicker @bind-Date="myDate"
                           PlaceHolder="تاریخ تولد"
                           Label="تولد شما:"
                           ValueChanged="DateChanged"
                           DarkMode="false"/>
    </div>
</div>


<p class="mt-2">@myDate</p>


@code{

    DateTime? myDate;

    void DateChanged(DateTime? value)
    {
        Console.WriteLine($"Date Changed: {value}");
    }
}

Validation Sample

@page "/"
@using System.ComponentModel.DataAnnotations
<PageTitle>Home</PageTitle>

<h1>Hello, world!</h1>

<EditForm Model="@Model" OnValidSubmit="Submit">
    <DataAnnotationsValidator />
    <ValidationSummary/>
    <div class="row" style="direction:rtl">
        <div class="col-md-4">
            <InputText class="form-control" @bind-Value="Model.Name" />
        </div>
        <div class="col-12"></div>
        <div class="col-md-4 mt-3">
            <PersianDatePicker @bind-Date="Model.BirthDate"
                               PlaceHolder="تاریخ تولد"
                               Label="تاریخ تولد:"
                               DarkMode="false"
                               For="()=>Model.BirthDate" 
                               Immediate="true"/>
        </div>
        <div class="col-12 mt-2">
            <button class="btn btn-primary" type="submit">Submit</button>
        </div>
    </div>
</EditForm>


<p class="mt-2">@Model.BirthDate</p>


@code{

    Student Model { get; set; } = new();


    public class Student
    {
        public string Name { get; set; }

        [Required]
        public DateTime? BirthDate { get; set; }
    }

    void Submit()
    {

    }
}


Screenshots

App Screenshot App Screenshot App Screenshot

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
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.2.5 124 9/25/2024
0.2.4 137 9/7/2024
0.2.3 100 8/29/2024
0.2.2 134 8/17/2024
0.2.1 100 8/7/2024
0.2.0 94 7/18/2024
0.1.0 90 7/14/2024
0.0.1 95 7/13/2024