date_picker_plus 4.1.0 copy "date_picker_plus: ^4.1.0" to clipboard
date_picker_plus: ^4.1.0 copied to clipboard

A Flutter library that provides a customizable Material Design date and range picker widgets.

example/lib/main.dart

import 'package:date_picker_plus/date_picker_plus.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      locale: const Locale('en', 'US'),
      localizationsDelegates: GlobalMaterialLocalizations.delegates,
      supportedLocales: const [
        Locale('en', 'GB'),
        Locale('en', 'US'),
        Locale('ar'),
        Locale('zh'),
      ],
      home: Builder(
        builder: (context) {
          return Scaffold(
            appBar: AppBar(),
            body: Center(
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  SizedBox(
                    height: 400,
                    child: DatePicker(
                      centerLeadingDate: true,
                      minDate: DateTime(2020),
                      maxDate: DateTime(2024),
                      initialDate: DateTime(2023, 1),
                      disabledDayPredicate: (date) {
                        return date.weekday == DateTime.sunday || date.weekday == DateTime.saturday;
                      },
                      disabledCellsDecoration: const BoxDecoration(
                        color: Colors.green,
                      ),
                    ),
                  ),
                ],
              ),
            ),
          );
        },
      ),
    );
  }
}
67
likes
150
points
11.9k
downloads
screenshot

Publisher

unverified uploader

Weekly Downloads

A Flutter library that provides a customizable Material Design date and range picker widgets.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, intl

More

Packages that depend on date_picker_plus