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
-1
votes
3 answers

how can to use Persian Calander in RecyclerViewAdapter

i using a specific date library(https://github.com/mohamad-amin/PersianMaterialDateTimePicker) now i want using it in a button in Recycler View. now my problem is I have to define two options in library codes : 1 - I should refer to the activity. 2…
-1
votes
1 answer

setMinDate by another datepicker

I have two datepicker, one is startTime and other is endTime. The problem is whenever I use setMinDate function to endTime -> which need larger than startTime. If selected startTime is over the current TIME. like -> startTime = 2017/11/17…
-1
votes
1 answer

setMinDate of a DatePicker from another DatePicker

I'm developing an app for a hotel (personal learning project). In the "Book Now" page I'm displaying 2 EditText fields. One for Check-in Date and another for Check-Out Date. I've set the DatePicker to only display current and future dates using the…
-1
votes
1 answer

Get the amount of days from and to Android

I keep getting the wrong amount on my calculation of getting the amount of total days. I want to get the absolute number of days from and to a certain date on my calendar. E.G - 1st Dec to 6th Dec should be 6 days, 15th September to 17th December…
Sam
  • 1,207
  • 4
  • 26
  • 50
-1
votes
4 answers

Here I had Use a material datepicker, but it is not showing the current year in calendar

I had use a material datepicker, but it is not showing the current year in calendar view Datepicker from_date.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { flage_from=true; …
-1
votes
1 answer

What is the reason my date picker is stopping before I click on Set Date?

I have used this datepicker but here my new activity is starting before I click on the set date button here is the code below:- import android.app.Activity; import android.app.DatePickerDialog; import android.app.Dialog; import…
Sourav Das
  • 33
  • 1
  • 5
-1
votes
1 answer

Double header bar on Android DatePicker when fragments are reopened

I'm running into this weird bug when using the DatePicker Dialog in Android where I get a secondary title bar. It only happens when I select a date, leave the fragment, then return to it. I'm doing nothing different when I create a new instance of…
robotsquidward
  • 163
  • 2
  • 16
-1
votes
1 answer

DatePicker on PreferenceFragmentCompat screen

I was using an unofficial PreferenceFragment compatibility layer for Android 1.6 and up. But Google has released v7 Preference Support Library. So my idea is to migrate project library. CURRENT IMPLEMENTATION: In the project I have created a custom…
-1
votes
2 answers

How to convert string month and year into complete date?

I am getting month and year in string format from date picker, how can I convert it to complete date using any date formatter?
Sumit T
  • 1,273
  • 2
  • 17
  • 32
-1
votes
3 answers

getDatePicker().setMinDate of DatePickerDialog does not work

I want the DatePickerDialog to not show dates before current date. I'm using the setMinDate(long l) method. But it's not working. I use a inner class where I set the minDate: public static class DatePickerFragment extends DialogFragment …
Abhi
  • 1,512
  • 2
  • 22
  • 46
-1
votes
3 answers

Insert Format of Date from DatePicker to SQL Server (datetime)

In my Android App, I want to insert date from DatePicker to SQL Server DB. The Date type in SQL Server is datetime. I can get Day and Month and Year from DatePicker like this : int day = datePicker.getDayOfMonth(); int…
Alireza
  • 89
  • 2
  • 15
-1
votes
1 answer

Setting minimum date on other date picker relevant to another date picker

I know that this may have been asked before, but I cant find a solution for my problem. I have two DatePickerDialogs in which, whenever the start date is set, i'll set the minimum date of the other datepickerdialog to that date. But it is still not…
MetaSnarf
  • 5,857
  • 3
  • 25
  • 41
-1
votes
2 answers

parse a date from string gives exception in android

I want to parse a string from string to date ,Date is of format like Tuesday March 19,2015. I want to parse and format it as yyyy-dd-mm format. The below code gives me exception that "unparceble date". Code : DateFormat df1 = new…
-1
votes
2 answers

Android datepicker disable all dates prior to 1st dec 2014

i have successfully implemented datepicker in android my problem is i want to disable all dates in datepicker prior to 1 st dec 2014 how can that be done ,i tried looking for examples but they all provide examples to disable date prior to todays…
1234567
  • 2,226
  • 4
  • 24
  • 69
-1
votes
1 answer

java.lang.NoSuchMethodError: android.app.DatePickerDialog.getDatePicker

i get java.lang.NoSuchMethodError: android.app.DatePickerDialog.getDatePicker this exception, when i use my DatePickerDialog on android 2.3.3. I know that getDatePicker() is available from 11 api, but all other methods available from api 1. How…
Kostya Khuta
  • 1,846
  • 6
  • 26
  • 48