amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

amp-date-picker better integration with amp-geo

Open maranag opened this issue 7 years ago • 2 comments

Use case:

Global site wants to display appropriate date format for region user is accessing from. Initial implementation thought is to use amp-geo with amp-bind and bind the format attribute in amp-date-picker.

A few issues:

  • The format attribute cannot be bound (only min, max, according to documentation)
  • There are issues around input boxes (default values) also displaying the correct date format. - Local attribute of amp-date-picker does not seem to be helpful.

Current resolution is to populate using amp-list and a template, but this doesn't seem to be the ideal approach. Also, given the input box issue, something like amp-date-display but as an amp-bind function would be useful in handling this type of use case.

maranag avatar Aug 28 '19 02:08 maranag

I should say 'locale' doesn't seem helpful in this regard (perhaps it should be?).

After much experimenting with binding and templates, the approach decided on is just to use the native date picker.

maranag avatar Sep 17 '19 00:09 maranag

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 10 '21 05:03 stale[bot]