android - How to stop the Date Picker Dialogue-box Date to set the previous Dates. It should allow only above System current date date -
android - How to stop the Date Picker Dialogue-box Date to set the previous Dates. It should allow only above System current date date -
hi every 1 in advance.. have requirement in app have date picker set date. want restrict date picker set date above scheme current dates not below scheme current date. how....? can 1 help me out this.... , how validate scheme current date date picker date.
in case can extend datepickerdialog
, create own implementation of ondatechanged
, called everytime date changes , parameters datepicker, , new year, month , day values, you can check if date past , in case throw error (with toast or whatever) , phone call datepicker.updatedate() set right value (so datepicker allways in consistent state).
also, can phone call datepicker.init(year, monthofyear, dayofmonth, ondatechangedlistener);
can pass
ondatechangedlistener implementation without having extend datepickerdialog.
edit: (i never seek think can done work..)
datepicker's
setmindate(long mindate)
sets minimal date supported numberpicker in milliseconds since jan 1, 1970 00:00:00 in getdefault() time zone.
example:
datepickerdialog dialog = new datepickerdialog(this, mdatesetlistener, cyear, cmonth, cday); dialog.getdatepicker().setmindate(new date());
android
Comments
Post a Comment