persian_calendar_widget 0.1.0 copy "persian_calendar_widget: ^0.1.0" to clipboard
persian_calendar_widget: ^0.1.0 copied to clipboard

Pick a date with a custom dialog box in Persian calendar.

persian_calendar_widget #

A Flutter package that provides users access to pick a date using a Persian calendar.

Screen Shots #

Minimal calendar

Minimal persian calendar

Usage #

MinimalPersianCalendar.pickFullDate widget #

/// pickFullDate dialog box
ElevatedButton(
    onPressed: () {
        /// open date picker widget
        /// user have access to pick day, month and year
        MinimalPersianCalendar.pickFullDate(
            context: context,
            onSubmit: (jalaliDate, dateInText) {
                /// when user choose date from dialog box and submit two
                /// types of `Jalali` date returned here
                /// Jalali [jalaliDate]: Jalali(year, month, day, hour, minute, second, millisecond)
                /// String [dateInText]: '12 ordibehesht 1403'
                setState(() {
                    selectedDate = dateInText;
                });
                log('dateInText of pick full date: $dateInText');
                log('jalaliDate of pick full date: $jalaliDate');
            },
        );
    },
    child: const Text('انتخاب روز ماه و سال')),

Documentation #

MinimalPersianCalendar Parameters #

Parameter Description Type Default
onSubmit Callback function returning the picked date Function(Jalali jalaliDate, String dateInText) Required
initialDate Initial date displayed in the calendar DateTime DateTime.now()
borderRadius Border radius of the dialog box double 20
maxYear Maximum selectable year int DateTime.now() + 11
minYear Minimum selectable year int DateTime.now()

Contributing #

Contributions are always welcome! If you have any suggestions, bug reports, or feature requests, please open an issue on the GitHub repository.

If you would like to contribute to the project, please read the CONTRIBUTING.md file for more information on how to contribute.

11
likes
0
points
32
downloads

Publisher

unverified uploader

Weekly Downloads

Pick a date with a custom dialog box in Persian calendar.

Homepage
Repository (GitHub)
View/report issues

Topics

#persian-calendar #persian-date-picker #shamsi-date-picker #jalali #date-picker

License

unknown (license)

Dependencies

flutter, shamsi_date

More

Packages that depend on persian_calendar_widget