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

New `date.xbl` that can be used by default in Form Builder #3657

Open
avernet opened this Issue Jul 16, 2018 · 11 comments

Comments

2 participants
@avernet
Collaborator

avernet commented Jul 16, 2018

Motivation:

  • Make the component more modern and easier to extend, for instance adding a placeholder (#3617). To satisfy this requirement, the component will be based off the bootstrap-datepicker widget.
  • Serve as an example for customers who would like to create their own date widget that uses another library (e.g. WET date picker for projects done by or for the Government of Canada).

Tasks:

  • Update value from server
  • Show value using proper format, as set by properties
  • smart entry (see comment below)
  • mobile support (also see comments below)
  • update demo forms
    • Controls form
    • DMV-14 form
  • P1: support Form Runner language and switching language
  • Form Builder: convert date fields to the new one
  • consider #3367
  • work in repeated grids, depends on #3687 to be done by @ebruchez
  • works with automatic PDF
  • works with PDF templates (see also #3800)
  • test
    • in repeated grids with inserts
    • in initially-hidden wizard pages
    • placeholder localization on IE11 and Edge

@avernet avernet self-assigned this Jul 16, 2018

@ebruchez ebruchez referenced this issue Jul 16, 2018

Closed

FB/FR: date, time and dateTime controls in XBL #2295

1 of 2 tasks complete

@avernet avernet added this to In Progress in Orbeon Forms 2018.2 Jul 16, 2018

@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Jul 17, 2018

Did you start work on this already @avernet?

@avernet

This comment has been minimized.

Collaborator

avernet commented Jul 17, 2018

Yes, the implementation is well underway, and I should soon have an MVP that I can push to master.

@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Jul 18, 2018

Ok cool.

@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Sep 4, 2018

For mobile support, see also #3707. We need a better/reliable way. Can we simply produce the type="date" in all cases?

@avernet

This comment has been minimized.

Collaborator

avernet commented Sep 4, 2018

In the past we've avoided generating type="date" to prevent desktop browsers from trying to show their own datepicker, which goes from "annoying and useless" to "clearly inferior to what JavaScript libraries do", depending on how charitable you are in your assessment.

But browsers have gotten better at this (see screenshots), so using the native datepicker, when supported, might not be entirely out of the question anymore.

@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Sep 4, 2018

That's better. We still have to decide whether we want more native behavior vs. uniform behavior. IE doesn't have support, and Safari desktop doesn't have support either.

avernet added a commit that referenced this issue Sep 14, 2018

avernet added a commit that referenced this issue Sep 14, 2018

avernet added a commit that referenced this issue Sep 14, 2018

@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Sep 17, 2018

Noticed that clicking on the "add-on" icon doesn't show the calendar. It's a bit unsettling as that's the first thing I tried to do.

@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Sep 18, 2018

If I enter "9/19", the field reverts to "9/18/2018". We need some level of smart entry support.

avernet added a commit that referenced this issue Sep 18, 2018

@avernet

This comment has been minimized.

Collaborator

avernet commented Sep 18, 2018

Now clicking on the "add-on" icon opens the calendar, as expected.

ebruchez added a commit that referenced this issue Sep 19, 2018

ebruchez added a commit that referenced this issue Sep 19, 2018

avernet added a commit that referenced this issue Sep 19, 2018

avernet added a commit that referenced this issue Sep 20, 2018

avernet added a commit that referenced this issue Sep 20, 2018

avernet added a commit that referenced this issue Sep 28, 2018

avernet added a commit that referenced this issue Oct 2, 2018

@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Oct 29, 2018

Added TODOs above to make sure this works with PDF templates in particular (see #3800).

avernet added a commit that referenced this issue Nov 7, 2018

avernet added a commit that referenced this issue Nov 7, 2018

avernet added a commit that referenced this issue Nov 13, 2018

avernet added a commit that referenced this issue Nov 14, 2018

@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Dec 10, 2018

Latest thinking for handling migration:

  • annotate-migrate.xsl: also migrate to fr:time
  • add a property to enable "optimal width" for date, etc. controls, true by default
  • template.xml has the property set to false
  • set outer CSS class based on property
  • adjust CSS of components
    • fr:date
    • fr:time
    • fr:us-phone
    • fr:dateTime
    • check old date, time and dateTime appear ok without migration at runtime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment