datetimepicker icon indicating copy to clipboard operation
datetimepicker copied to clipboard

Added ability to set date range for datetimepicker and minimum minute interval for time picker

Open raymondlam opened this issue 11 years ago • 10 comments

Set the date range by calling: datePickerDialog.setDateRange(startYear, startMonth, startDay, endYear, endMonth, endDay); Days outside this period will be disabled.

The minute interval restricts you to select every 1/5/10/15 etc minutes (defaults to 1). The minute interval can be changed for the time picker by calling setMinutesInterval(val);

raymondlam avatar Jan 29 '14 01:01 raymondlam

I'm looking for this functionallity as well, could this be merged?

jdegroot avatar Feb 11 '14 13:02 jdegroot

Why are not merged?

ipcjs avatar Sep 29 '14 12:09 ipcjs

It's a great feature. @flavienlaurent , are you going to merge it in the main project?

artem-sh avatar Oct 10 '14 08:10 artem-sh

It's certainly a great feature but there are lots of changes ;)

flavienlaurent avatar Oct 10 '14 08:10 flavienlaurent

@flavienlaurent , I'm ready to be a beta tester!

artem-sh avatar Oct 10 '14 09:10 artem-sh

Hello, This is very nice library. And i would like to use this more and more projects. Please help me to solve following problem. I have used this date picker library to show date selection in my project. I have to show two date picker dialog. in first dialog,suppose today is 4th Nov and i select 12th November and in second dialog date start from 12th November of selected year. I did all the things. But in second dialog i face the focus of current date selection. I want to remove focus from current date and move to focus on 12th Nov,. How can i do this? Please help me.

Yasmik avatar Nov 04 '14 04:11 Yasmik

date.setDateRange(YEAR, MONTH, DAY, YEAR + 1, MONTH, DAY);

on this line i am getting this error, "The method setDateRange(int, int, int, int, int, int) is undefined for the type DatePickerDialog" What is a problem? please help me to solve this

parin9097 avatar Feb 06 '15 14:02 parin9097

Hello, I like this library, and i would like to know if it's possible to disable a specific dates (futur dates) with this library? I'm working on a reservation application, and i want to disable a specific dates giving only the DayOfWeek. I found this limitation in the default android DatePicker/TimePicker. we can only set the max/min dates. I will be so thankfull if you give me some suggestions of libraries to implement my solution.

maryemealaoui avatar Feb 25 '15 10:02 maryemealaoui

Any chance of having a min/max time for time picker to go along with the intervals?

srodenberg avatar Aug 20 '15 14:08 srodenberg

Hey,

How can I access the the selected date and time fields from onDateSet() and onTimeSet() methods in my onCreate() method of MainActivity?

ghost avatar Jan 19 '16 22:01 ghost