Questions tagged [materialdatepicker]

52 questions
6
votes
3 answers

MaterialDatePicker returning wrong value

I am using MaterialDatePicker in android studio for the user to be able to choose the date of birth, after selecting the date, the returned value is a long with the timestamp of the selected date (milliseconds since 01/01/1970). The problem is that…
Bruno Baccho
  • 131
  • 9
5
votes
3 answers

wrong day in Android Material DatePicker

i'm trying to get te selected date from DatePicker but always i have one day less than the selected For example, if I select 14/2/2022 i obtain 13/2/2022 and if I select 8/10/2018 i obtain 7/10/2018 This is my code: private fun DatePickerSelected()…
5
votes
2 answers

MaterialDatePicker returns incorrect date after selection

For some unknown reason, MaterialDatePicker returns incorrect date after selection. For example, user is in Mexico region with timezone: America/Tijuana. When he selects in visual representation: 2021-10-05, in resulting text I have -1 day,…
yozhik
  • 4,644
  • 14
  • 65
  • 98
4
votes
1 answer

Date range picker overlaps phone's navigation buttons

I am currently using this version of the material library com.google.android.material:material:1.7.0-alpha02 However, when I show a date range picker using the martial date picker, the picker overlaps the navigation buttons on my phone see image…
George
  • 2,865
  • 6
  • 35
  • 59
4
votes
2 answers

How to format Angular Material date-picker inside Formly form for service layer (not display format)

I would like to expose my date value as date only ("yyyy-MM-dd") on an Angular Material date picker. Currently, the default date value is an ISO format (includes time). I have a starter Stackblitz project with the the required setup. The…
ctaleck
  • 1,658
  • 11
  • 20
4
votes
3 answers

How can I change Material DateRangePicker color in android?

dateLI.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { MaterialDatePicker.Builder> builder = MaterialDatePicker.Builder.dateRangePicker(); …
3
votes
1 answer

How to set year limit in MaterialDatePicker dialog Android Studio

I'm having trouble set max. and min. years in Material Design Datepickerdialog, also put an image of the Material Date picker dialog box where only one year is being shown. Below is Code long today = MaterialDatePicker.todayInUtcMilliseconds(); …
3
votes
0 answers

Format month inside material ui picker

How to format month inside month view in material-ui picker? By default they are displayed as "short" (Jan) and I want to display "long" names (January). I followed their documentation but couldn't figure out why it doesn't work. I am using date-fns…
2
votes
0 answers

How to import css for Angular Material Datepicker?

I'm using Bootstrap for my angular project. In my angular.json, I added bootstrap like this: "styles": [ "src/styles.css", "node_modules/bootstrap/dist/css/bootstrap.css" ], I need to add a datepicker to my project. Angular…
Metaphysiker
  • 983
  • 2
  • 18
  • 35
2
votes
1 answer

Material DatePicker Disable year option

I've got the following code: private void openDatePicker() { MaterialDatePicker picker = MaterialDatePicker.Builder.datePicker() .setTitleText("Select date") .setTheme(R.style.DatePickerTheme) …
2
votes
0 answers

Android material-date-picker, change colors without using theme

I'm using material date picker, and would like to change the accentcolor (for header background, selected date and buttons), but I don't know the color until runtime (as it's user defined and coming from an external source), so can't define a theme…
Charlie Walker
  • 129
  • 1
  • 2
  • 9
2
votes
2 answers

MaterialDatePicker android selects previous to specified date instead of the specified date

When I create a MaterialDatePicker it picks the previous date of the date I specified, instead of the specified date: You can see that the EditText has May 12, 2019 but the DatePicker shows as May 11, 2019 Code for the openDatePicker is: protected…
Sam Lite
  • 41
  • 1
  • 7
2
votes
1 answer

minDate props overrides the null state value for Material-ui Datepicker

I have a component where the minDate in the material-ui Datepicker is overriding the null value and making the minDate as selected value. Not only this it even triggers the onChange function for this. My component call (selectedDate's initial state…
2
votes
1 answer

Limit to max 7 days selection in Material date range picker Android

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…
hasan_shaikh
  • 1,434
  • 1
  • 15
  • 38
2
votes
1 answer

How to change the Material Date & Time Picker background color in Android?

How to change the Material Date & Time Picker background color in Android? i found many solution default date & time picker not Material design
1
2 3 4