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

Calendar mCalendar does not get updated when changing date with keyboard #4

Open
GoogleCodeExporter opened this issue Jul 22, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Change date/time with keyboard then hit ok
2. The listeners do not get triggered therefore not updating the value.
3.

What is the expected output? What do you see instead?

I expect the date/time I set using the keyboard to be updated

What version of the product are you using? On what operating system?

Android SDK 4.0.4/4.1.1

Please provide any additional information below.

Solution is easy if you add listeners for keyboard input and in the listeners 
you update the Calendar object values

Original issue reported on code.google.com by [email protected] on 13 Feb 2013 at 5:20

@GoogleCodeExporter
Copy link
Author

Sorry this seems to be an Android bug not something you're doing.

Original comment by [email protected] on 13 Feb 2013 at 5:43

@GoogleCodeExporter
Copy link
Author

For those interested, calling datepicker.clearFocus()/timepicker.clearFocus() 
when the OK button is clicked solves this problem.  Looking at the 
DatePickerDialog code helped me figure it out.

Original comment by [email protected] on 13 Feb 2013 at 9:23

@GoogleCodeExporter
Copy link
Author

For Android L its not updating the UI. but for Kitkat i have checked it works 
fine. is this the android Bug? or any other work around to fix this issue?

Solution: I have tried----> DatePicker datePicker = (DatePicker) 
mDateTimeDialogView.findViewById(R.id.DatePicker);


                // Init time picker
                TimePicker timePicker = (TimePicker) mDateTimeDialogView.findViewById(R.id.TimePicker);
                datePicker.clearFocus();
                timePicker.clearFocus(); 

then getting the values for Day, Year Month then its working!!!

But from DateTimePicker.class get(Calender.Year) not working!!! pls help.

Original comment by [email protected] on 23 Dec 2014 at 5:48

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

No branches or pull requests

1 participant