-
Notifications
You must be signed in to change notification settings - Fork 89
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
Android-SwitchDateTimePicker app get crashed when setMinimumDateTime #24
Comments
Here, i want to disable past date. |
And ? I do not understand what you want ? be more specific. Otherwise I see one problem, If you define a new Date after another new Date, the next one will be a little bit after (because of milliseconds), so your code can't work because you can't define a default time before the minimum date. |
suppose today, 24 june 2017 so, i want like, maximum datetime will with 24 july 2017 and want to hide past date and default date will be last selected date(will be between 24 june to 24 july). |
As I said, it comes from the time that is after the minimum date. Simply init hours, minutes an seconds
|
yes, its work fine thank you very much. |
hi, i want to set minimum time too but it seems like it doesn't works Calendar cal = Calendar.getInstance(); Please guide me.... thank you so much |
The minimum time is planned but not yet available. (See #11) |
minimum date is working fine but while i have set hour minute and secont it still allow to change it. i wand to disable past hour minute too cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH), cal.get(Calendar.HOUR), cal.get(Calendar.MINUTE), cal.get(Calendar.SECOND)); dateTimeFragment.setMinimumDateTime(cal.getTime()); |
I understood correctly, it is a functionality planned, but it is necessary to modify the view of hours and minutes to disable events, to gray the numbers, and to refactor the view for a good code. It's a lot of work and not much time. :/ (You can contribute if you want the feature faster. ;)) |
Fot timepicker you can use this login can you please check once we can replace under library. Please refer above attached file |
SwitchDateTimeDialogFragment dateTimeFragment = (SwitchDateTimeDialogFragment) getActivity().getSupportFragmentManager().findFragmentByTag("tv_materialDateTime");
// init datetime picker
if (dateTimeFragment == null) {
dateTimeFragment = SwitchDateTimeDialogFragment.newInstance(
getString(R.string.label_datetime_dialog),
getString(android.R.string.ok),
getString(android.R.string.cancel)
);
}
dateTimeFragment.show(getActivity().getSupportFragmentManager(), "tv_materialDateTime");
The text was updated successfully, but these errors were encountered: