Monday, 5 August 2019

Material Style Date Picker with Bikram Sambat(Nepali) Calendar Support

Material Style Date Picker with Bikram Sambat


Nepali Date Picker

Material and Cupertino Style Date Picker with Bikram Sambat(Nepali) Calendar Support. Supports Android, iOS and Fuchsia. Available in Nepali and English Languages.
Material Style Date Picker with Bikram Sambat
Nepali Date Picker returns data in NepaliDateTime type, which is
included in nepali_utils
package.

Salient Features

  • Material DatePicker
  • Cupertino DatePicker
  • Adaptive DatePicker
  • Supports from 2000 B.S. to 2099 B.S.

Usage

Material Style Date Picker

import 'package:nepali_date_picker/nepali_date_picker.dart' as picker;

NepaliDateTime _selectedDateTime = await picker.showMaterialDatePicker(
    context: context,
    initialDate: NepaliDateTime.now(),
    firstDate: NepaliDateTime(2000),
    lastDate: NepaliDateTime(2090),
    language: _language,
    initialDatePickerMode: DatePickerMode.day,
);

print(_selectedDateTime); // 2076-02-16T00:00:00
Dart

Cupertino Style Date Picker

picker.showCupertinoDatePicker(
    context: context,
    initialDate: NepaliDateTime.now(),
    firstDate: NepaliDateTime(2000),
    lastDate: NepaliDateTime(2090),
    language: _language,
    dateOrder: _dateOrder,
    onDateChanged: (newDate) {
        print(_selectedDateTime);
    },
);
Dart

Adaptive Date Picker

Shows DatePicker based on Platform.
i.e. Cupertino DatePicker will be shown on iOS while Material on Android and Fuchsia.
NepaliDateTime _selectedDateTime = await picker.showAdaptiveDatePicker(
    context: context,
    initialDate: NepaliDateTime.now(),
    firstDate: NepaliDateTime(2000),
    lastDate: NepaliDateTime(2090),
    language: _language,
    dateOrder: _dateOrder, // for iOS only
    initialDatePickerMode: DatePickerMode.day, // for platform except iOS
);
Dart

Screenshots

Material Design (Portrait)
Material Style Date Picker with Bikram Sambat


Material Design (Landscape)

Material Style Date Picker with Bikram Sambat

Cupertino Design


GitHub

Material Style Date Picker with Bikram Sambat(Nepali) Calendar Support. Supports both Android and ios. — Read More
Latest commit to the master branch on 8-3-2019
Download as zip