Search packages, repositories and app categories

flutter_linear_datepicker cover
Package detailsv3.0.1

flutter_linear_datepicker

A flutter package providing Gregorian and Jalaali (Persian) date picker

AndroidiOSWebmacOSWindowsLinux
30-day downloads
248
Likes
63
Pub points
130

Install package

flutter pub add flutter_linear_datepicker

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter package offering a linear, intuitive date picker interface for both Gregorian and Jalaali (Persian) calendars. Designed with simplicity and accessibility in mind, it supports multiple platforms including Android, iOS, Web, macOS, Windows, and Linux. The picker provides smooth navigation between months and years, with customizable styling and localization options. Ideal for apps requiring dual-calendar support or catering to Persian-speaking users.

Use cases

  • Dual calendar selection (Gregorian and Jalaali)
  • Form inputs requiring date selection
  • Apps targeting Persian-speaking audiences
  • Cross-platform date pickers
  • Customizable date picker UI

Key features

  • Supports Gregorian and Jalaali calendars
  • Linear, easy-to-navigate interface
  • Cross-platform compatibility
  • Customizable appearance
  • Localization-ready
  • Simple integration via pub add

Suitable for

  • International applications
  • Iranian or Persian-language apps
  • Developers needing dual calendar support
  • UI-focused date input components
  • Projects requiring lightweight date pickers

Considerations

  • Limited to two calendar systems
  • No built-in time selection
  • Requires manual handling of date formatting
  • May need additional localization setup
  • Not optimized for complex date ranges

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Flutter Persian (Jalali) and Gregorian Linear Date Picker

Pub

This package provides a Persian or Gregorian linear DatePicker for flutter.

Screenshot 1 Screenshot 2


Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
 flutter_linear_datepicker: ^3.0.1
2. Install it

You can install packages from the command line:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_linear_datepicker/flutter_datepicker.dart';

How to use?

Simple usage

just simply put following widget in your flutter code:

LinearDatePicker(
  dateChangeListener: (DateTime selectedDate) {
    print(selectedDate);
  },
);

Advanced usage

You can customize widget using below parameters:

LinearDatePicker(
  startDate: DateTime(2022),
  endDate: DateTime.now().add(Duration(days: 365)),
  initialDate: DateTime.now(),
  dateChangeListener: (DateTime selectedDate) {
    print(selectedDate);
  },
  showDay: true,  //false -> only select year & month
  labelStyle: TextStyle(
    fontFamily: 'sans',
    fontSize: 14.0,
    color: Colors.black,
  ),
  selectedRowStyle: TextStyle(
    fontFamily: 'sans',
    fontSize: 18.0,
    color: Colors.deepOrange,
  ),
  unselectedRowStyle: TextStyle(
    fontFamily: 'sans',
    fontSize: 16.0,
    color: Colors.blueGrey,
  ),
  yearLabel: 'سال | year',
  monthLabel: 'ماه | month',
  dayLabel: 'روز | day',
  showLabels: true, // to show column captions, eg. year, month, etc.
  columnWidth: 100,
  showMonthName: true,
  isJalali: false,  // false -> Gregorian
  debounceDuration: Duration(milliseconds: 300), // delay duration to emit the selected date
  monthsNames: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12',] // custom name for each month
)

Used Packages

MarcinusX/NumberPicker FatulM/shamsi_date

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package

No data available yet.