Kunzisoft/Android-SwitchDateTimePicker

set default date on click as todays date currently showing december 2017

Closed this issue · 5 comments

set default date on click as todays date currently showing december 2017

What code is used? Works well for me

its working fine now need to set dateTimeFragment.setDefaultDateTime(myCalendar.getTime()); while initialisation.

Another problem i am getting is when i click a view quickly it gives exception Fragment already added.Do you know any solution for this.

yajra commented

@himanshu-infield having the same issue, were you able to figure out a solution?

yajra commented

Ok, I think I found a way for fragment added concern:

if (dateTimeFragment.isAdded) {
  return
}
dateTimeFragment.show(...)

These are not really bugs, you can initialize the default date with the one you want and otherwise it's normal fragment management. ;)