Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

raymondlam
Copy link
Contributor

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 raymondlam mentioned this pull request Jan 29, 2014
@jdegroot
Copy link

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

@ipcjs
Copy link

ipcjs commented Sep 29, 2014

Why are not merged?

@artem-sh
Copy link

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

@flavienlaurent
Copy link
Owner

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

@artem-sh
Copy link

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

@Yasmik
Copy link

Yasmik commented Nov 4, 2014

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.

@parin9097
Copy link

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

@maryemealaoui
Copy link

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.

@srodenberg
Copy link

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

@ghost
Copy link

ghost commented Jan 19, 2016

Hey,

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants