FLUTTER ECOSYSTEM

CeylonCodeLabs/date_time_picker_widget

CeylonCodeLabs/date_time_picker_widget open-source repository details.

날짜 및 시간 선택 위젯 프로젝트 이미지
Stars
8
Forks
15
최근 푸시(UTC)
2026. 6. 24.
프로젝트 상태
활성
CeylonCodeLabs GitHub avatar
GITHUB Organization

CeylonCodeLabs ↗

Sri Lanka
언어DartHTMLSwiftKotlinObjective-C

사용 중인 의존성

의존성 목록 6 개

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

date_time_picker_widget

pub package

This package brings us a way to pick date and time with fresh new UI design

Usage

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  ...
  date_time_picker_widget: ^2.0.0

In your library add the following import:

import 'package:date_time_picker_widget/date_time_picker_widget.dart';

For help getting started with Flutter, view the online documentation.

Example

There are three presentations for DateTimePickerWidget and can be defined in the type parameter:

  • DateTimePickerType.Date will present date picker;
  • DateTimePickerType.Time will present time picker;
  • DateTimePickerType.Both will present date and time picker both;
DateTimePicker(
  type: DateTimePickerType.Both, // options: [Date | Time | Both], default is Both
  ...
)

More complete example:

DateTimePicker(
  initialSelectedDate: dt,
  startDate: dt.add(Duration(days: 1)),
  endDate: dt.add(Duration(days: 60)),
  startTime: DateTime(dt.year, dt.month, dt.day, 6),
  endTime: DateTime(dt.year, dt.month, dt.day, 18),
  timeInterval: Duration(minutes: 15),
  datePickerTitle: 'Pick your preferred date',
  timePickerTitle: 'Pick your preferred time',
  timeOutOfRangeError: 'Sorry shop is closed now',
  is24h: false,
  onDateChanged: (date) {
    setState(() {
      _d1 = DateFormat('dd MMM, yyyy').format(date);
    });
  },
  onTimeChanged: (time) {
    setState(() {
      _t1 = DateFormat('hh:mm:ss aa').format(time);
    });
  },
)

Demo

Demo

Screen Shot

Screenshot