Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom date picker for date fields in AMP forms #6469

Closed
rudygalfi opened this issue Dec 2, 2016 · 24 comments
Closed

Custom date picker for date fields in AMP forms #6469

rudygalfi opened this issue Dec 2, 2016 · 24 comments

Comments

@rudygalfi
Copy link
Contributor

This issue is opened to collect requirements and track development of being able to use a custom date picker in conjunction with the date field support in AMP forms.

@ericlindley-g
Copy link
Contributor

/cc @dandv @choumx @aghassemi

FYI
This has been coming up more recently, now that a lot of the needs for e-commerce have been addressed. Chatted w/ Malte about the feature, and current thinking is that we may be able to take an approach similar to autocomplete, where we both

a) expose the events in bind to make this work and create an ABE that demos how folks could compose an advanced case, and
b) create a simple, good-UX solution encapsulated as a higher-level component, as well

@ericlindley-g ericlindley-g moved this from Backlog to Backlog (shortlist) in UI May 25, 2017
@vsiv
Copy link

vsiv commented May 31, 2017

Can't wait for autocomplete and this. 👍

@dandv
Copy link
Contributor

dandv commented Jun 1, 2017

+1. Date range picking has been requested by travel partners - searching for hotel availability for example.

@aghassemi
Copy link
Contributor

I highly recommend we try to find an existing good open-source implementation and integrate it. A high quality, mobile friendly date picker with a11y and i18n support is a lot of work. Supporting non-Gregorian calendars adds a lot to it as well.

Looking at Airbnb's version (https://github.com/airbnb/react-dates): 500 commits, 57 contributors, thousands lines of code...

@eric30
Copy link

eric30 commented Dec 27, 2017

I tried to follow all the steps and gave it a try, however it didn't work out. There's a 404 error occurred:

image

Is this a bug or did I do something wrong?

@aghassemi
Copy link
Contributor

/cc @erwinmombay regarding last comment, looks like unversioned Canary is pointing to prod. Enabling Dev Channel seems to only impact cached resources and not origins.

@ericlindley-g ericlindley-g moved this from Backlog (shortlist) to E-comm in UI Jan 5, 2018
@lswang1618
Copy link

Update that this is now working in the Dev Channel.

@adnanyousafch
Copy link

Any timeline for when it will be out of experimental stage?

@aghassemi
Copy link
Contributor

@lswang1618 @cvializ Given default styles are now in, I personally feel comfortable moving this to at least a doc-level optin so folks can start shipping in 3-4 weeks, thoughts? (@cvializ I guess we still need the validation rules).

@lswang1618
Copy link

Sure, sgtm.

@cvializ cvializ modified the milestones: New FRs, Sprint H2 February Feb 26, 2018
@vonkow
Copy link

vonkow commented Mar 24, 2018

Any update on this timeline?

@mdiblasio
Copy link

Should the calendars be hidden by default or do they need to be implemented inside of a lightbox?

This demo has the calendars hidden, but AMPByExample Demo displays them by default.

Which is expected?

@rudygalfi
Copy link
Contributor Author

@mdiblasio Isn't it a user experience choice for the publisher? cc @lswang1618

@mdiblasio
Copy link

I'm more referring to the inconsistency between the 2 demos, which have nearly the same implementations.

Demo 1:
demo 1

Demo 2:
demo 2

Neither use a lightbox but the first demo doesn't display the calendar until the field is clicked. If the publisher doesn't want to show the calendar until clicked, is there an attribute or must they use a lightbox?

@lswang1618
Copy link

It's an attribute - use mode:overlay

@ampprojectbot
Copy link
Member

This issue hasn't been updated in awhile. @lswang1618 Do you have any updates?

@dreamofabear dreamofabear assigned cvializ and unassigned lswang1618 Sep 18, 2018
@88kbbq
Copy link

88kbbq commented Nov 29, 2018

What about validation? How do you make this date picker a mandatory field like e-mail or name? Documentation for validation seems not to apply to this component.

@88kbbq
Copy link

88kbbq commented Nov 29, 2018

What about validation? How do you make this date picker a mandatory field like e-mail or name? Documentation for validation seems not to apply to this component.

Ah, the required attribute needs to appear in the input field within the date picker, not the amp-date-picker component itself. Tricky!

@aghassemi
Copy link
Contributor

has been implemented and launched. If you have any FR or bugs, please fine a new ticket.

@Pachara
Copy link

Pachara commented Dec 25, 2019

I am looking for Time Picker.
Any Ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Forms
Backlog
UI
  
E-comm
Development

No branches or pull requests