[DatePicker] Null pointer exception in mobile date picker
See original GitHub issueDescription:
- Launch Material Date Picker in Catalog (Pickers -> Demo -> Launch Material Date Picker)
- Select any day in the view so that it’s highlighted
- Press the edit icon to switch to the TextInput field.
- The TextInput field should be populated with the selected date.
- Press the backspace key to erase the text.
- The app will immediately crash after erasing the last character from the field.
Expected behavior: Erasing the last character in the TextInput field should be erased.
Source code:
java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference
at com.google.android.material.datepicker.SingleDateSelector$1.onValidDate(SingleDateSelector.java:113)
at com.google.android.material.datepicker.DateFormatTextWatcher.onTextChanged(DateFormatTextWatcher.java:64)
Android API version: compileSdkVersion = 29 minSdkVersion = 14 targetSdkVersion = 27
Material Library version: 1.1.0-alpha10
Device: Samsung S8 and Pixel 3 XL
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:11 (6 by maintainers)
Top Results From Across the Web
DatePicker crashing with NullPointerException - Stack Overflow
It seems as though you have not initialized edit_eventFrom anywhere in the code you posted. You will need to inflate that View from...
Read more >DatePickerDialog - Android Developers
Creates a new date picker dialog for the current date using the parent context's default date picker ... Returns the DatePicker contained in...
Read more >DatePicker - .NET MAUI - Microsoft Learn
The .NET Multi-platform App UI (.NET MAUI) DatePicker invokes the platform's date-picker control and allows you to select a date.
Read more >NullReferenceException in DateTimePickerAdv.Value
When I try to set the Value of a date time picker, I get a null pointer exception. The code couldn''t be any...
Read more >Datepicker - Angular Material
This error is thrown if more than one <input> tries to claim ownership over the same <mat-datepicker> (via the matDatepicker attribute on the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mcastagnolo EOD it is 😄
https://github.com/material-components/material-components-android/releases/tag/1.1.0-beta01
@ldjcmu Should have specified, is it planned for this week EOD today Friday or is it being released before the end of Sunday?