From 5aa6edfaed08a6dff8439b51e91cd43e2ffb0386 Mon Sep 17 00:00:00 2001 From: pfthomas Date: Thu, 26 Oct 2023 19:25:42 +0000 Subject: [PATCH] [DatePicker] Fix date validation on Samsung devices Resolves https://github.com/material-components/material-components-android/pull/3628 Resolves https://github.com/material-components/material-components-android/issues/3625 PiperOrigin-RevId: 576953414 --- .../android/material/datepicker/DateFormatTextWatcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/java/com/google/android/material/datepicker/DateFormatTextWatcher.java b/lib/java/com/google/android/material/datepicker/DateFormatTextWatcher.java index 19cbdf96edc..c64833fe8cf 100644 --- a/lib/java/com/google/android/material/datepicker/DateFormatTextWatcher.java +++ b/lib/java/com/google/android/material/datepicker/DateFormatTextWatcher.java @@ -123,7 +123,7 @@ public void afterTextChanged(@NonNull Editable s) { } char nextCharHint = formatHint.charAt(s.length()); - if (!Character.isDigit(nextCharHint)) { + if (!Character.isLetterOrDigit(nextCharHint)) { s.append(nextCharHint); } }