Category : datepicker

I have 2 DatePickers, one is start date picker and the other is end date picker. I want to set the min date of the end DatePicker to the start date which user has selected. I’ve tried in this way but it’s not working 🙁 ipDcEventStartDay.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v){ final Calendar ..

Read more

I have 2 date Picker, one is startDay and the other is endDay. I want to set min-date of endDay’s Date Picker to startDay which user have selected. My startDay date picker code : final Calendar c = Calendar.getInstance(); startYear = c.get(Calendar.YEAR); startMonth = c.get(Calendar.MONTH); startDay = c.get(Calendar.DAY_OF_MONTH); DatePickerDialog dpd = new DatePickerDialog(DoubleCheckEventActivity.this, new DatePickerDialog.OnDateSetListener() ..

Read more

I have already read this post but nothing helped me. The listener is still not called. Here is my code: private void callDatePicker() { // получаем текущую дату final Calendar cal = Calendar.getInstance(); mYear = cal.get(Calendar.YEAR); mMonth = cal.get(Calendar.MONTH); mDay = cal.get(Calendar.DAY_OF_MONTH); dl = new OnDateSetListener() { @Override public void onDateSet(DatePicker view, int year, int ..

Read more

I’m a beginner who started to learn about date-picker in android kotlin, my date-picker works well. But I need to make multiple date-picker in my project and i don’t know how to do that. MainActivity.kt class MainActivity : AppCompatActivity(), DatePickerDialog.OnDateSetListener { var day = 0 var month = 0 var year = 0 var savedDay ..

Read more

I have implemented this for date range selection. How do I restrict the limit of the date range. I want the user to select max of seven days from the start date selected. Adding my code below, private fun showDateRangePicker() { val constraintsBuilder = CalendarConstraints.Builder() val validators: ArrayList<CalendarConstraints.DateValidator> = ArrayList() validators.add(DateValidatorPointBackward.before(MaterialDatePicker.todayInUtcMilliseconds())) validators.add(DateValidatorWeekdays()) constraintsBuilder.setValidator(CompositeDateValidator.allOf(validators)) val dateRangePicker ..

Read more

I am using DatePicker dialog to picking date. I want to remove the name of day, which is displayed on dialog box. How to remove that name? Please help… See following attatchment see below image Code is below … // now create instance of the material date picker MaterialDatePicker.Builder materialDateBuilder = MaterialDatePicker.Builder.datePicker(); materialDateBuilder.setTitleText(""); // get ..

Read more

Has anyone been able to modify the datepicker in android to have both date and time selector? I have searched far and wide and have not been able to find something. Google tasks has a very nice datepicker that looks like this: custom datepicker in google tasks app Source: Android..

Read more