persian-datetime-picker

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

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

Screenshots

screenshot_date

screenshot_date2

screenshot_time

screenshot_time2

screenshot_range_date

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);

GitHub

Download the full project for this post from the following button

This source is fully free for all time

Download as zip

Comments are closed.

You're Offline!

Top