36 Commits

Author SHA1 Message Date
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
marianomartin
33733bd331 Remove {@link Month}`s from javadocs
PiperOrigin-RevId: 292335010
2020-01-31 11:11:22 -05:00
haodong
b1c4f539e1 Made LG devices exceptions for using date type of keyboard for date picker text input.
Resolves https://github.com/material-components/material-components-android/issues/901

- Check if the device is LG, and change the keyboard type if yes.
- Remove the exception for Samsung devices, they updated their date type keyboard with "." and "/".

PiperOrigin-RevId: 290753487
2020-01-21 09:13:23 -08:00
zkovar
0e6c21d3c0 [MaterialDatePicker] Ability to Start Picker in MaterialTextInputPicker Mode
Resolves https://github.com/material-components/material-components-android/pull/867
Resolves https://github.com/material-components/material-components-android/issues/865

GIT_ORIGIN_REV_ID=de3f50710c06d17331d366eb9b4d240ec205a1f8
Co-authored-by: pekingme <pekingme@gmail.com>
PiperOrigin-RevId: 289676795
2020-01-14 11:00:51 -08:00
dniz
4e0a016d07 Update MaterialDatePicker to read colorSurface from correct context
Fixes issue where colorSurface from materialCalendarTheme is ignored

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

PiperOrigin-RevId: 286194512
2019-12-18 15:55:09 -05:00
haodong
6694175a5f Fixed getDayCopy utility function in UtcDates for DatePicker.
- was copying year/month/date fields between Calendar objects in different time zones.
- convert input Calendar object into a Calendar object in UTC, then copy year/month/date fields to the return Calendar object.

PiperOrigin-RevId: 284597830
2019-12-10 07:22:59 -05:00
haodong
77ce281f04 Fixed MaterialDatePicker todayInUtcMilliseconds method.
- Used UtcDates to return the UTC milliseconds of today in local timezone.
- Previous method is replaced with thisMonthInUtcMilliseconds, which fits its function better.
Resolves https://github.com/material-components/material-components-android/issues/778

PiperOrigin-RevId: 283981946
2019-12-05 15:58:26 -05:00
ldjesper
e56db0cee9 Update CHAR_LIMIT to 2 for MaterialCalendar strings that require a sub-character for i18n
PiperOrigin-RevId: 280474887
2019-11-15 15:10:57 -05:00
ldjesper
62a2164f18 Include separator characters for Samsung devices in MaterialDatePicker
Resolves https://github.com/material-components/material-components-android/issues/682

PiperOrigin-RevId: 279146671
2019-11-07 16:12:20 -05:00
ldjesper
c097d3d335 Separate date format string from date hint string in MaterialDatePicker for better hints.
Resolves https://github.com/material-components/material-components-android/issues/695

PiperOrigin-RevId: 279095896
2019-11-07 16:10:05 -05:00
haodong
7708ca4db1 Automated g4 rollback of changelist 277103254
PiperOrigin-RevId: 277545348
2019-11-01 13:28:40 -07:00
Nikita
b575fc78dd Improve scroll behavior of MaterialCalendar on low end devices
Resolves https://github.com/material-components/material-components-android/pull/711

GIT_ORIGIN_REV_ID=7808f83d1c4de45711aae4c5f1740506b5484c1c
PiperOrigin-RevId: 277201251
2019-11-01 13:28:40 -07:00
haodong
5db6b5f2f8 Automated g4 rollback of changelist 275944003
PiperOrigin-RevId: 277103254
2019-11-01 13:28:40 -07:00
haodong
8c8eaac2b1 Automated g4 rollback of changelist 275859720
PiperOrigin-RevId: 275944003
2019-11-01 13:28:40 -07:00
haodong
69e399f9c4 Updated TextInputLayout to support empty string as error message.
PiperOrigin-RevId: 275859720
2019-11-01 13:28:40 -07:00
ldjesper
394bac6be0 Add MaterialDatePicker style and theme attributes to public.xml
Resolves https://github.com/material-components/material-components-android/issues/664

PiperOrigin-RevId: 273854001
2019-10-10 15:53:13 -04:00
ldjesper
9cd22eb30a Sentence case all non-titles in MaterialDatePicker
PiperOrigin-RevId: 273592300
2019-10-10 15:50:29 -04:00
ldjesper
6e0307248e Update renamed private String GRID_SELECTOR_KEY to renamed class (DateSelector) in MaterialDatePicker
PiperOrigin-RevId: 269875653
2019-09-20 10:57:25 -04:00
ldjesper
ee891219d5 Change text scaling and landscape width for small screens.
PiperOrigin-RevId: 269862267
2019-09-20 10:45:32 -04:00
ldjesper
e2f7ee026e Fix NPE when erasing text input box for SingleDateSelector
Resolves https://github.com/material-components/material-components-android/issues/590

PiperOrigin-RevId: 269852927
2019-09-18 14:42:45 -04:00
marianomartin
167663ae45 Internal cleanup
PiperOrigin-RevId: 268698913
2019-09-12 14:29:01 -04:00
ldjesper
691b1bdc06 Increase some MaterialDatePicker dimensions to handle device scaled font sizes on small devices
PiperOrigin-RevId: 268452885
2019-09-12 14:06:43 -04:00
ldjesper
801172e401 Update DateValidator JavaDocs in MaterialDatePicker
PiperOrigin-RevId: 268451832
2019-09-12 14:05:41 -04:00
ldjesper
fe56e2ecc7 Allow setting of MaterialDatePicker title via CharSequence plus JavaDoc updates
PiperOrigin-RevId: 268445763
2019-09-12 14:03:01 -04:00
ldjesper
cdcccfbc5c Fix missing ok and cancel in landscape MaterialDatePicker
We make the middle pane scrollable in cases where things just will not fit

PiperOrigin-RevId: 268301091
2019-09-12 14:01:19 -04:00
ldjesper
54bf4cbb82 Fix NPE from MaterialDatePicker rotation when MaterialCalendar is not visible.
calendar.getCurrentMonth() is nullable so we check before accessing

PiperOrigin-RevId: 268290292
2019-09-12 14:00:30 -04:00
ldjesper
a402ece66e Fix fuzzy boundary on selected year in MaterialDatePicker dialog mode
PiperOrigin-RevId: 268274108
2019-09-12 13:58:40 -04:00
ldjesper
d78d93577f Remove Month from the public API
PiperOrigin-RevId: 268242042
2019-09-12 13:57:19 -04:00
ldjesper
38e01beb1d MaterialDatePicker forces UTC
PiperOrigin-RevId: 267992416
2019-09-12 13:52:21 -04:00
marianomartin
215a839598 Internal cleanup
PiperOrigin-RevId: 267504117
2019-09-12 13:48:16 -04:00
ldjesper
e6cb937ca1 Remove MaterialDatePicker testing tags from the public scope in favor of package scope.
PiperOrigin-RevId: 267009956
2019-09-04 18:09:37 -04:00
ldjesper
72d54c653c Change picker package to com.google.android.material.datepicker
PiperOrigin-RevId: 267004501
2019-09-04 18:07:59 -04:00