Skip to content

sahmadreza/persian-datetime-picker

 
 

Repository files navigation

A persian (farsi,shamsi) datetime picker for flutter, inspired by material datetime picker.

pub package

A Flutter persian datetime picker inspired by material datetime picker and based on shamsi_date.

You can pick date / range date / time / date and time.

Screenshots

Usage

Add it to your pubspec.yaml file:

dependencies:

persian_datetime_picker: version

In your library add the following import:

import  'package:persian_datetime_picker/persian_datetime_picker.dart';

Here is an example how to use:

Jalali picked = await showPersianDatePicker(
    context: context,
    initialDate: Jalali.now(),
    firstDate: Jalali(1385, 8),
    lastDate: Jalali(1450, 9),
);
var label = picked.formatFullDate();

var picked = await showTimePicker(
  context: context,
  initialTime: TimeOfDay.now(),
);
var label = picked.persianFormat(context);

##Pull request and feedback are always appreciated. ###Contact me with [email protected].

About

a persian (farsi) date time picker in flutter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 99.8%
  • Other 0.2%