All Projects → heysupratim → Materialdaterangepicker

heysupratim / Materialdaterangepicker

Licence: apache-2.0
A material Date Range Picker based on wdullaers MaterialDateTimePicker

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Materialdaterangepicker

Angular Bootstrap Datetimepicker
Native Angular date/time picker component styled by Twitter Bootstrap
Stars: ✭ 1,289 (-1.98%)
Mutual labels:  picker, datepicker, timepicker, datetimepicker
Datetimepicker
jQuery Plugin Date and Time Picker
Stars: ✭ 3,402 (+158.71%)
Mutual labels:  picker, datepicker, timepicker, datetimepicker
Pickerjs
⚠️ [Deprecated] No longer maintained. JavaScript date time picker.
Stars: ✭ 299 (-77.26%)
Mutual labels:  picker, datepicker, timepicker, datetimepicker
popoPicker
popoPicker是一个移动端3D滚轮日期时间和单项的选择器,支持无限循环滚动,不依赖第三方库
Stars: ✭ 26 (-98.02%)
Mutual labels:  timepicker, datepicker, picker, datetimepicker
Datetimepicker
This is a custom android holo datepicker timepicker
Stars: ✭ 56 (-95.74%)
Mutual labels:  picker, datepicker, timepicker, datetimepicker
Material Ui Pickers
Date & Time pickers, built with ❤️ for @material-ui/core
Stars: ✭ 2,291 (+74.22%)
Mutual labels:  picker, datepicker, timepicker, datetimepicker
React Native Paper Dates
Smooth and fast cross platform Material Design date and time picker for React Native Paper
Stars: ✭ 173 (-86.84%)
Mutual labels:  material, picker, datepicker, timepicker
svelty-picker
Simple date & time picker in svelte
Stars: ✭ 38 (-97.11%)
Mutual labels:  timepicker, datepicker, datetimepicker
Vue Ctk Date Time Picker
VueJS component to select dates & time, including a range mode
Stars: ✭ 707 (-46.24%)
Mutual labels:  picker, datepicker, timepicker
Vue Datetime
Mobile friendly datetime picker for Vue. Supports date and datetime modes, i18n and more.
Stars: ✭ 928 (-29.43%)
Mutual labels:  datepicker, timepicker, datetimepicker
NodaTimePicker
A Date/Time picker component library for Blazor using NodaTime
Stars: ✭ 49 (-96.27%)
Mutual labels:  timepicker, datepicker, datetimepicker
skwas-cordova-plugin-datetimepicker
Cordova Plugin for showing a native date, time or datetime picker.
Stars: ✭ 37 (-97.19%)
Mutual labels:  timepicker, datepicker, datetimepicker
Persianrangedatepicker
Persian range date picker for android.
Stars: ✭ 48 (-96.35%)
Mutual labels:  picker, datepicker, timepicker
Tempus Dominus
A powerful Date/time picker widget.
Stars: ✭ 6,900 (+424.71%)
Mutual labels:  picker, datepicker, datetimepicker
vue3-date-time-picker
Datepicker component for Vue 3
Stars: ✭ 157 (-88.06%)
Mutual labels:  timepicker, datepicker, datetimepicker
Angular Moment Picker
Angular Moment Picker is an AngularJS directive for date and time picker using Moment.js.
Stars: ✭ 536 (-59.24%)
Mutual labels:  picker, datepicker, timepicker
Androidpicker
安卓选择器类库,包括日期及时间选择器(可用于出生日期、营业时间等)、单项选择器(可用于性别、民族、职业、学历、星座等)、二三级联动选择器(可用于车牌号、基金定投日期等)、城市地址选择器(分省级、地市级及区县级)、数字选择器(可用于年龄、身高、体重、温度等)、日历选日期择器(可用于酒店及机票预定日期)、颜色选择器、文件及目录选择器、图片选择器等……WheelPicker/DatePicker/TimePicker/OptionPicker/NumberPicker/LinkagePicker/AddressPicker/CarPlatePicker/CalendarPicker/ColorPicker/FilePicker/ImagePicker etc.
Stars: ✭ 5,320 (+304.56%)
Mutual labels:  picker, datepicker, timepicker
Rc Datetime Picker
React component for datetime picker by Moment.js
Stars: ✭ 85 (-93.54%)
Mutual labels:  picker, datepicker, datetimepicker
nativescript-datetimepicker
Plugin with date and time picking fields
Stars: ✭ 26 (-98.02%)
Mutual labels:  timepicker, datepicker, datetimepicker
react-calendar-datetime-picker
A simple and fast date and time picker component for React
Stars: ✭ 58 (-95.59%)
Mutual labels:  timepicker, datepicker, picker

Android Arsenal

Download

Maven Central

Material Date and Time Picker with Range Selection

Credits to the original amazing material date picker library by wdullaer - https://github.com/wdullaer/MaterialDateTimePicker

Adding to your project

Add the jcenter repository information in your build.gradle file like this

repositories {
  jcenter()
}


dependencies {
  implementation 'com.borax12.materialdaterangepicker:library:2.0'
}

Beginning Version 2.0 now also available on Maven Central

Date Selection

FROM TO

Time Selection

FROM TO

Support for Android 4.0 and up.

From the original library documentation -

You may also add the library as an Android Library to your project. All the library files live in library.

Using the Pickers

  1. Implement an OnDateSetListener or OnTimeSetListener
  2. Create a ``DatePickerDialog` using the supplied factory

Implement an OnDateSetListener

In order to receive the date set in the picker, you will need to implement the OnDateSetListener interfaces. Typically this will be the Activity or Fragment that creates the Pickers.

or

Implement an OnTimeSetListener

In order to receive the time set in the picker, you will need to implement the OnTimeSetListener interfaces. Typically this will be the Activity or Fragment that creates the Pickers.

//new onDateSet
@Override
public void onDateSet(DatePickerDialog view, int year, int monthOfYear, int dayOfMonth,int yearEnd, int monthOfYearEnd, int dayOfMonthEnd) {

}

@Override
public void onTimeSet(DatePickerDialog view, int year, int monthOfYear, int dayOfMonth,int yearEnd, int monthOfYearEnd, int dayOfMonthEnd) {
        String hourString = hourOfDay < 10 ? "0"+hourOfDay : ""+hourOfDay;
        String minuteString = minute < 10 ? "0"+minute : ""+minute;
        String hourStringEnd = hourOfDayEnd < 10 ? "0"+hourOfDayEnd : ""+hourOfDayEnd;
        String minuteStringEnd = minuteEnd < 10 ? "0"+minuteEnd : ""+minuteEnd;
        String time = "You picked the following time: From - "+hourString+"h"+minuteString+" To - "+hourStringEnd+"h"+minuteStringEnd;

        timeTextView.setText(time);

}

Create a DatePickerDialog` using the supplied factory

You will need to create a new instance of DatePickerDialog using the static newInstance() method, supplying proper default values and a callback. Once the dialogs are configured, you can call show().

Calendar now = Calendar.getInstance();
DatePickerDialog dpd = DatePickerDialog.newInstance(
  MainActivity.this,
  now.get(Calendar.YEAR),
  now.get(Calendar.MONTH),
  now.get(Calendar.DAY_OF_MONTH)
);
dpd.show(getFragmentManager(), "Datepickerdialog");

Create a TimePickerDialog` using the supplied factory

You will need to create a new instance of TimePickerDialog using the static newInstance() method, supplying proper default values and a callback. Once the dialogs are configured, you can call show().

Calendar now = Calendar.getInstance();
TimePickerDialog tpd = TimePickerDialog.newInstance(
                        MainActivity.this,
                        now.get(Calendar.HOUR_OF_DAY),
                        now.get(Calendar.MINUTE),
                        false
                );
tpd.show(getFragmentManager(), "Timepickerdialog");

For other documentation regarding theming , handling orientation changes , and callbacks - check out the original documentation - https://github.com/wdullaer/MaterialDateTimePicker

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].