Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/milad-karimifard/persianblazordatepickercomponent
Persian date picker component for Blazor
https://github.com/milad-karimifard/persianblazordatepickercomponent
blazor blazorcomponent
Last synced: about 1 month ago
JSON representation
Persian date picker component for Blazor
- Host: GitHub
- URL: https://github.com/milad-karimifard/persianblazordatepickercomponent
- Owner: milad-karimifard
- Created: 2021-08-03T13:29:41.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-08-03T13:36:14.000Z (over 3 years ago)
- Last Synced: 2024-10-05T06:41:05.078Z (3 months ago)
- Topics: blazor, blazorcomponent
- Language: CSS
- Homepage:
- Size: 1010 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
**1 - First install package**
```
Install-Package PersianBlazorDatePickerComponent -Version 1.0.0
```**2 - Reference styles**
In ***wwwroot*** folder open ***Index.html*** file and add this reference inside head tag
```html
```**3 - Import Component**
Add the code below to **_Imports.razor** file to import the component`
```razor
@using PersianBlazorDatePickerComponent
```**4 - Initialize Component**
For initialize the component you must use **PersianDatePicker** tag in your page. this tag require 4 property to set.
- **ref : ** instance of *PersianDatePicker* class
- **SelectedDateTimeValueChanged : ** an event fires when new value selected and return selected value (DateTime)
- returned value calendar is Gregorian
- **MinDateTime : ** Minimum value can selected by component
- Must input Gregorian Date
- **MaxDateTime : ** Maximum value can selected by component
- Must input Gregorian DateExample :
```C#
@code
{
private PersianDatePicker theDatePicker;
DateTime selectedDateTime;void ClickHandler(DateTime date)
{
selectedDateTime = date;
}
}
```Now component setup successfully completed , just one more step remains. for show component in page and use it you need a button to trigger the component.
Example
```c#
Open@code
{
private PersianDatePicker theDatePicker;
DateTime selectedDateTime;void ClickHandler(DateTime date)
{
selectedDateTime = date;
}private void OpenDatePicker()
{
theDatePicker.ToggleActiveDatePicker();
}
}
```