Questions tagged [android-datepicker]

Android DatePicker is a widget for selecting a date. The date can be selected by a year, month, and day spinners or a CalendarView. The set of spinners and the calendar view are automatically synchronized.

Android DatePicker is a widget for selecting a date. The date can be selected by a year, month, and day spinners or a CalendarView. The set of spinners and the calendar view are automatically synchronized.

Android DatePickerDialog is a dialog that hosts a DatePicker widget.

786 questions
13
votes
6 answers

Month name is appearing with M+number in datePicker dialog in android

I am trying to display date in datePicker dialog in a format like Sep|29|2016. you can see in following image. Expected output unfortunately most of the time i am getting 28|M09|2016 rarely i am getting expected output. you can see in following…
Sujay
  • 2,510
  • 2
  • 27
  • 47
13
votes
5 answers

Android set DatePicker to a certain date

I have 3 strings containing day, month and year values. For example: String mday = "02"; String mmonth="07"; String myear="2013"; I need to set the DatePicker in my activity to a month from the date above. I do not mean just add 1 to the mmonth…
user1137313
  • 2,390
  • 9
  • 44
  • 91
13
votes
3 answers

Popup DatePicker for EditText

Been trying to look at other questions on here regarding DatePickers popping up for EditText but I've had problems getting it working. I've seen examples where you can use setOnClickListener or setOnTouchListener, which one would be the best? Also…
Mark O'Sullivan
  • 10,138
  • 6
  • 39
  • 60
13
votes
6 answers

How to change textsize in datepicker?

The default textsize in datepicker is too big for my app. I've seen a way suggested to change it here, but fishing around for the textviews nested inside the datepicker class seems clunky and error prone. Is there a better/cleaner way to do it?
gcl1
  • 4,070
  • 11
  • 38
  • 55
12
votes
8 answers

MaterialDatePicker get selected dates

I'm calling a MaterialDatePicker like this in Android: MaterialDatePicker.Builder> builder = MaterialDatePicker.Builder.dateRangePicker(); CalendarConstraints.Builder constraintsBuilder = new…
12
votes
7 answers

Last selected date is not getting in datepicker dialog

In my app I have one datepicker, I am able to select and set the selected date in textview, but the issue is if again I click on textview to open datepicker dialog, it always shows current date instead of last selected date..so what is the issue? …
Aditya
  • 1,508
  • 1
  • 19
  • 37
12
votes
3 answers

Set default Locale to DatePicker and TimePicker

I'm using a DatePicker and a TimePicker in a custom Dialog. The functionality works fine, but I have a problem when I change the default Locale of the app to match the Arabic language. The problem is that the DatePicker and TimePicker are not…
12
votes
5 answers

Set android datepicker date limits

I am using datePicker in android to display images based on user selected dates. I need to limit said dates to certain days for instance Jan 1st 2010 to Dec 31st 2010. Simple as that i thought but no where can i find the answer on how to limit these…
brass
  • 612
  • 2
  • 5
  • 15
11
votes
5 answers

MaterialDatePicker Select Date between 2 dates only

How to add a constraint to MaterialDatePicker to force user to select a date between only 2 dates? val constraintBuilder = CalendarConstraints.Builder() val materialRangeBuilder = MaterialDatePicker.Builder.datePicker() …
11
votes
4 answers

DatePicker having a background

the problem is that my date picker having an ugly White background behind the date picker i just want that background to Disappear this is My code public void selectDate(View view) { DialogFragment newFragment = new SelectDateFragment(); …
Jehad
  • 472
  • 2
  • 10
  • 24
11
votes
5 answers

How to disable dates before today date in DatePickerDialog Android?

I want to disable the dates before today date in the DatePickerDialog .I am new in android please suggest me how could i do this .Here is my code that i have written for DatePickerDialog final DatePickerDialog.OnDateSetListener date = new…
Developer
  • 6,292
  • 19
  • 55
  • 115
10
votes
1 answer

How to change Theme of "MaterialDatePicker" in Android?

I've used MaterialDatePicker for the purpose of selecting a single date & also I had achieved that task but I cannot change the theme of the header & button. MaterialDatePicker.Builder builder; MaterialDatePicker…
10
votes
1 answer

MaterialDatePicker shows current date instead of needed

Using MaterialDatePicker I want to show required date and give an opportunity to select another. But when a DatePicker appears it shows current date instead of specified. I plug the library: implementation…
10
votes
4 answers

Datepicker: How to popup datepicker when click on edittext using C# xamarin

How to show a date picker popup on Edit Text click or focus event in Xamarin.Android ?
ratnamanjari swain
  • 111
  • 1
  • 1
  • 4
10
votes
4 answers

Still able to select disabled dates in date picker

I want to disable the past dates of date picker in android. i can do it by using dialog.getDatePicker().setMinDate(System.currentTimeMillis() - 1000); This is working fine and the past dates in date picker looks disabled. But I can still click on a…
deep
  • 1,586
  • 1
  • 18
  • 29
1 2
3
52 53