81 Commits

Author SHA1 Message Date
hunterstich
db42490dde [DatePicker] Fixed incorrect date being selected on scrollable months.
Resolves https://github.com/material-components/material-components-android/issues/1973

PiperOrigin-RevId: 351396382
2021-01-12 18:37:48 -05:00
Mika
00e33202a5 [DatePicker] Fix NullPointerException on MonthAdapter.updateSelectedState(MonthAda…
Resolves https://github.com/material-components/material-components-android/pull/1944
Resolves https://github.com/material-components/material-components-android/issues/1943

GIT_ORIGIN_REV_ID=d02d6307ea08ea505ea6535ce909e7d1b268847b
PiperOrigin-RevId: 350783859
2021-01-08 13:50:58 -05:00
marianomartin
3e79942871 [DatePicker] Localized numbers in month
Resolves https://github.com/material-components/material-components-android/issues/1948

PiperOrigin-RevId: 350567674
2021-01-07 12:10:44 -05:00
marianomartin
bec2de92ac [DatePicker] Fixed day of week adapter localization for APIs before O
Resolves https://github.com/material-components/material-components-android/issues/1948

PiperOrigin-RevId: 350474335
2021-01-07 12:06:34 -05:00
hunterstich
6ad8301fb6 [I18n] Update string translations
PiperOrigin-RevId: 340622036
2020-11-04 11:22:36 -05:00
dniz
90929ee274 [MaterialDatePicker] Fixed overzealous smooth scrolling when horizontally swiping between months
Resolves https://github.com/material-components/material-components-android/issues/920

PiperOrigin-RevId: 337879242
2020-10-19 11:43:33 -07:00
Material Design Team
ffcf70adde [DatePicker] Changes to allow the MaterialCalendar to exist inside a scrollable view.
PiperOrigin-RevId: 336952059
2020-10-15 13:23:12 -07:00
dniz
d82742695c [DatePicker] Update header title strings to match spec
PiperOrigin-RevId: 334794175
2020-10-01 11:27:11 -04:00
dniz
98c7cd15ee [DatePicker] Fixed formatting of year month date pattern for year selection dropdown
PiperOrigin-RevId: 334616659
2020-09-30 17:00:29 -04:00
dniz
af375eb31a [DatePicker] Added string translations for i18n / l10n
Resolves https://github.com/material-components/material-components-android/issues/761
Resolves https://github.com/material-components/material-components-android/issues/868
Resolves https://github.com/material-components/material-components-android/issues/1216
Resolves https://github.com/material-components/material-components-android/issues/1353
Resolves https://github.com/material-components/material-components-android/issues/1764

PiperOrigin-RevId: 334440771
2020-09-29 16:39:24 -04:00
dniz
2f9c2b0491 [Cleanup] Fix formatting of copyrights in xml
PiperOrigin-RevId: 334423264
2020-09-29 16:34:51 -04:00
dniz
8f455c0b90 [DatePicker] Fixed issue where default selection date would visually stay selected when choosing different date
PiperOrigin-RevId: 334167845
2020-09-28 11:49:51 -07:00
dniz
5507687b19 [DatePicker] Updated default selection-based openAt logic to consider valid calendar constraints
Fixes crash where default selection is outside of calendar constraints bounds. With this commit, in that case we now show the default selection date in the header, but the user can still only choose a new date within the constraints.

Follow-up to:
- https://github.com/material-components/material-components-android/pull/1651
- https://github.com/material-components/material-components-android/issues/1199

PiperOrigin-RevId: 332455279
2020-09-18 14:02:24 -07:00
Gabriele Mariotti
ea763862b4 [MaterialDatePicker] Fixed the filled range with RTL layout
Resolves https://github.com/material-components/material-components-android/pull/1731

GIT_ORIGIN_REV_ID=6be1c14b2f4a93d180ffe1f760cec5f277f03613
PiperOrigin-RevId: 332245028
2020-09-17 11:10:37 -07:00
marianomartin
5541f027d2 [DatePicker] Delay showing validation error by 1 second
PiperOrigin-RevId: 332116212
2020-09-17 11:08:20 -07:00
cketcham
c65a26281b [DatePicker] Updates the color of the month labels in fullscreen mode
PiperOrigin-RevId: 331017575
2020-09-11 14:26:09 -04:00
Gabriele Mariotti
193ce2dc48 [DatePicker] Changed openAt to default based on selection, if not provided
Resolves https://github.com/material-components/material-components-android/pull/1651

GIT_ORIGIN_REV_ID=09bf7a4ddb3cba2e55efaab45f09765e7910544b
PiperOrigin-RevId: 330938479
2020-09-10 11:15:59 -04:00
cketcham
bf86d82e61 [DatePicker] Allow for styling dialog close icon color for full screen dialog
PiperOrigin-RevId: 330739711
2020-09-10 11:11:43 -04:00
Gabriele Mariotti
85739c7e05 [MaterialDatePicker] Added a datevalidator for multiple range
Resolves https://github.com/material-components/material-components-android/pull/1622

GIT_ORIGIN_REV_ID=a125081ffc609b969f841cd7a830f35d17861ee9
Co-authored-by: ymarian <38727469+ymarian@users.noreply.github.com>
PiperOrigin-RevId: 330725106
2020-09-09 11:25:13 -04:00
cketcham
6cb28b927b [DatePicker] Update month and year navigation to use the correct color
PiperOrigin-RevId: 328774367
2020-08-28 10:10:06 -04:00
Material Design Team
431e092649 [DatePicker] Made some MaterialCalendar related methods/classes public, but still restricted.
PiperOrigin-RevId: 326494150
2020-08-13 16:53:54 -04:00
Material Design Team
fb23efff45 [DatePicker] Allow RangedDateSelectors with multiples ranges in different months to be shown correctly.
PiperOrigin-RevId: 326054201
2020-08-11 14:46:48 -04:00
Material Design Team
b12c5c5b00 [DatePicker] Speed up calendar performance by only updating certain views when a day is clicked, instead of recreating and redrawing all of them.
PiperOrigin-RevId: 325850735
2020-08-11 14:39:26 -04:00
Gabriele Mariotti
6050bd4347 [MaterialDatePicker] Added placeholder text in text input mode to show date format
Resolves https://github.com/material-components/material-components-android/pull/1528

GIT_ORIGIN_REV_ID=a4e436bbbc270d4716f78e9919f50315da75c5b3
PiperOrigin-RevId: 323879097
2020-07-30 00:20:55 -04:00
dniz
b82d41fe55 [MaterialDatePicker] Fixed orientation of next/previous month button icons for RTL languages
Resolves https://github.com/material-components/material-components-android/issues/1485
Resolves https://github.com/material-components/material-components-android/pull/1518

Co-authored-by: Mattia <darksoulcyber@hotmail.it>
PiperOrigin-RevId: 323566996
2020-07-28 10:29:58 -04:00
dniz
5bd64f42d3 [DatePicker] Updated text input mode to respect custom theme res id
Resolves https://github.com/material-components/material-components-android/issues/966

PiperOrigin-RevId: 322809365
2020-07-27 13:17:42 -04:00
leticiars
d868be243c [DatePicker] Set min width on the confirm OK button.
May fix https://github.com/material-components/material-components-android/issues/1346

PiperOrigin-RevId: 321169998
2020-07-15 09:48:22 -07:00
marianomartin
049ad022a6 Delete components build.gradle files
PiperOrigin-RevId: 320944144
2020-07-15 09:38:31 -07:00
marianomartin
811d45216b [DatePicker] Fixed crash when GridView has not rendered the last child
Resovles https://github.com/material-components/material-components-android/issues/1338

PiperOrigin-RevId: 318811845
2020-06-29 16:16:37 -04:00
marianomartin
555356b03f Internal cleanup
PiperOrigin-RevId: 318134343
2020-06-26 14:06:52 -04:00
marianomartin
20e238869c [Internal] Added a TextWatcherAdapter class
PiperOrigin-RevId: 317355871
2020-06-26 13:57:26 -04:00
raajkumars
712a2ce920 [datepicker]Fixed issue that causes the Datepicker to highlight the wrong day as today.
Resolves https://github.com/material-components/material-components-android/issues/882

PiperOrigin-RevId: 315317701
2020-06-08 16:32:12 -04:00
dniz
7965098849 [MaterialDatePicker] Disable positive button when invalid or incomplete dates are selected
Resolves https://github.com/material-components/material-components-android/issues/1270
Resolves https://github.com/material-components/material-components-android/pull/1271

PiperOrigin-RevId: 313390751
2020-05-27 13:59:38 -04:00
dniz
67e9eaf341 [MaterialDatePicker] Fix check for date input keyboard separator characters for single selection mode
Pointed out in d6b2da8b50 (r39471904)

PiperOrigin-RevId: 313382685
2020-05-27 13:50:17 -04:00
raajkumars
b546cbd3ed Updated UtcDates class in datepicker implementation to allow injection of TimeSource instead of directly using Calendar.getInstance().
PiperOrigin-RevId: 312715093
2020-05-21 16:54:41 -04:00
dniz
0bdb2cbdbd [MaterialDatePicker] Make customDatePicker method public but restricted for now
PiperOrigin-RevId: 312495780
2020-05-20 17:11:37 -04:00
dniz
d854e78d54 [MaterialDatePicker] Hide customDatePicker method since DateSelector API is not exposed yet. We will consider exposing this method and the DateSelector APIs in 1.3.
PiperOrigin-RevId: 312332065
2020-05-19 18:49:32 -04:00
raajkumars
d2f81cae5a Fixed issue that causes the Datepicker to highlight wrong the day as today.
Resolves https://github.com/material-components/material-components-android/issues/882

PiperOrigin-RevId: 310565860
2020-05-08 15:27:44 -04:00
raajkumars
2023df01b3 Renamed Month.today() to Month.current() to make it obvious that this method returns the first moment of the current month and not the first moment of the current day.
PiperOrigin-RevId: 310417056
2020-05-08 14:43:12 -04:00
hunterstich
a265520e42 [MaterialDatePicker] Update datepicker drawable resources to use material_ prefix.
Resolves https://github.com/material-components/material-components-android/issues/1166

PiperOrigin-RevId: 305078908
2020-04-06 13:26:41 -07:00
Material Design Team
e6e9a07f4b Automated g4 rollback of changelist 305014223
PiperOrigin-RevId: 305017071
2020-04-06 12:47:42 -07:00
hunterstich
2ac7fb75df [MaterialDatePicker] Prefix drawables with mtrl_ to avoid client confliects.
Resolves https://github.com/material-components/material-components-android/issues/1166

PiperOrigin-RevId: 305014223
2020-04-06 12:34:43 -07:00
marianomartin
f90181efef Fix javadocs errors for DatePicker, Transformation, and FAB
PiperOrigin-RevId: 300553804
2020-03-13 11:00:54 -04:00
marianomartin
5706775bfd Expose customDatePicker so people don't have to limit to range or
single date.

Resolves https://github.com/material-components/material-components-android/issues/893

PiperOrigin-RevId: 297875559
2020-02-28 15:12:40 -05:00
marianomartin
e664b98062 [MaterialDatePicker] Crash - Scroll to Min Year of CalendarConstraint
Resolves https://github.com/material-components/material-components-android/pull/981
Resolves https://github.com/material-components/material-components-android/issues/980

PiperOrigin-RevId: 296000173
2020-02-19 13:36:30 -05:00
Felipe Roriz
4ccb052d2b [MaterialDatePicker] Added a DateValidator for a bounded range.
Resolves https://github.com/material-components/material-components-android/pull/972

GIT_ORIGIN_REV_ID=29cbbd569f5284f0bdf4cc1bdad60f93f92856eb

Co-authored-by: ymarian <38727469+ymarian@users.noreply.github.com>
PiperOrigin-RevId: 295810824
2020-02-18 18:03:44 -05:00
onats1
89e0e5628e [Date Picker] Created a date validator class to handle resctrictions from previous dates until the current date.
Resolves https://github.com/material-components/material-components-android/pull/946

GIT_ORIGIN_REV_ID=442df27d6bd2d7c01de471328ba3a44eff82660d

Co-authored-by: ymarian <38727469+ymarian@users.noreply.github.com>
PiperOrigin-RevId: 294982034
2020-02-13 13:57:28 -08:00
klblk
a67932de13 [MaterialDatePicker] Change to standalone month format
Resolves https://github.com/material-components/material-components-android/pull/1000

GIT_ORIGIN_REV_ID=24a02c2ce3daa40add8f1ec3bbd6860fcc4b6be1
PiperOrigin-RevId: 294516910
2020-02-12 10:13:32 -05:00
haodong
d6b2da8b50 [DatePicker] Added workaround for Samsung and LG devices to show URL keyboard when enter date in text.
PiperOrigin-RevId: 294219052
2020-02-10 14:31:45 -05:00
isabellekim
840a809715 Remove TODO bug reference.
PiperOrigin-RevId: 292337224
2020-01-31 11:12:21 -05:00