GoogleJump / returnJump

7 stars 2 forks source link

Expiry date calendar starts at Nov 2100 #6

Closed khrubes closed 10 years ago

khrubes commented 10 years ago

When selecting a date, the calendar on the right starts date at Nov 2100, when the bars on the left scroll it will automatically switch to the current month and date. However if you click on the calendar on the right first, it will switch the year scrollbar on the left to 2100, which is annoying because then you will have to scroll back to the current year.

The code for this calendar object is in KelseyActivity.java

heres a lovely screenshot

screenshot_2014-05-13-14-18-37

khrubes commented 10 years ago

So I'm working on this issue currently. After looking at the code in KelseyActivity.java, I learned this picker/calendar object is called a DatePicker. After looking at the API for the DatePicker class, (http://developer.android.com/reference/android/widget/DatePicker.html) It says that

"The set of spinners and the calendar view are automatically synchronized."

You can see this synchronization happen when you click on the spinners or the calendar, because one will change the other. However, this synchronization isn't happening initially?!?

I've tried accessing the calendar field through

CalendarView calendarView = datePickerDialog.getDatePicker().getCalendarView(); //and then calendarView.setDate(Calendar.getInstance().getTimeInMillis() / 86400000L * 86400000L);

but this doesn't really do anything. Any suggestions on what to do? This has been driving me crazy haha

khrubes commented 10 years ago

I found a really sweet custom DatePicker from this project https://github.com/derekbrameyer/android-betterpickers

I was thinking maybe including this project in place of the DatePicker we are using now, it would ideally get rid of this issue while enhancing the appearance. Its presented as an Android Library project.

Thoughts?

adsouza commented 10 years ago

https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)

Looks like you should be fine using it :)

On Thu, May 15, 2014 at 1:24 PM, Kelsey Hrubes notifications@github.comwrote:

I found a really sweet custom DatePicker from this project https://github.com/derekbrameyer/android-betterpickers

I was thinking maybe including this project in place of the DatePicker we are using now, it would ideally get rid of this issue while enhancing the appearance. Its presented as an Android Library project.

Thoughts?

— Reply to this email directly or view it on GitHubhttps://github.com/GoogleJump/returnJump/issues/6#issuecomment-43239395 .

http://www.adsouza.net/