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

Add readonly support to input-date-picker & input-time-picker #1947

Closed
joeyHarig opened this issue Apr 12, 2021 · 12 comments
Closed

Add readonly support to input-date-picker & input-time-picker #1947

joeyHarig opened this issue Apr 12, 2021 · 12 comments
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. enhancement Issues tied to a new feature or request.

Comments

@joeyHarig
Copy link
Contributor

joeyHarig commented Apr 12, 2021

Description

Add read-only support to the input date and time pickers.

Acceptance Criteria

  • A new readOnly prop is added
  • When true, it should set readonly on the input to true and prevent the popover support components from being displayed.

Which Component

  • calcite-input-date-picker
  • calcite-input-time-picker

Example Use Case

Readonly: When the date/time has already been set and can not be changed.

Additional info

https:/Esri/calcite-components/blob/master/src/components/input/input.tsx#L215-L220
#2734

@joeyHarig joeyHarig added 0 - new New issues that need assignment. enhancement Issues tied to a new feature or request. labels Apr 12, 2021
@driskull
Copy link
Member

@paulcpederson @eriklharper @macandcheese We don't have readonly on calcite-input so we would need to add that first, correct? Is there a reason we don't have it currently?

@paulcpederson
Copy link
Member

No, we should probably have readonly for inputs to maintain API parity with native HTML.

@macandcheese
Copy link
Contributor

Yeah agree.. right now you can add readonly and the styles will correctly apply, and the attribute will render on the child input element... however it’s not defined as a custom prop - it’s just getting spread if present - so it’s not getting documented.

Should add that so it’s on the calcite input and to the point of the issue probably anything that wraps one like a date, or time input.

@eriklharper
Copy link
Contributor

eriklharper commented Apr 14, 2021

I'm in favor of removing spread attributes as a general principle. Best to always explicitly define the attributes being used and supported.

@eriklharper eriklharper changed the title Enhancement: input-date-picker sates Enhancement: input-date-picker states Apr 14, 2021
@driskull
Copy link
Member

I'm in favor of removing spread attributes as a general principle. Best to always explicitly define the attributes being used and supported.

Yeah, we shouldn't be passing everything into the internals of the component.

@driskull driskull added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Apr 14, 2021
@eriklharper eriklharper removed their assignment Sep 22, 2021
@benelan benelan added 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Feb 16, 2022
@jcfranco
Copy link
Member

The disabled prop support was handled by #2655, so I'll repurpose this issue to add read-only support to the input date/time pickers. cc @benelan

@jcfranco jcfranco changed the title Enhancement: input-date-picker states Add readonly support to input-date-picker & input-time-picker Jun 30, 2022
@jcfranco
Copy link
Member

@benelan can we squeeze this one for this release?

@benelan benelan removed the needs triage Planning workflow - pending design/dev review. label Jul 1, 2022
@benelan benelan added this to the Sprint 06/27 - 07/08 milestone Jul 1, 2022
@benelan
Copy link
Member

benelan commented Jul 1, 2022

@benelan can we squeeze this one for this release?

Sure, triaged!

@jcfranco
Copy link
Member

jcfranco commented Jul 1, 2022

@Elijbet Can you look at this one for this release?

@Elijbet
Copy link
Contributor

Elijbet commented Jul 1, 2022

@Elijbet Can you look at this one for this release?

Sure thing.

@Elijbet Elijbet added 2 - in development Issues that are actively being worked on. and removed 0 - new New issues that need assignment. labels Jul 7, 2022
@Elijbet Elijbet self-assigned this Jul 7, 2022
@github-actions github-actions bot removed this from the Sprint 06/27 - 07/08 milestone Jul 11, 2022
@github-actions github-actions bot added this to the Sprint 07/11 - 07/22 milestone Jul 11, 2022
@Elijbet Elijbet added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Jul 19, 2022
@github-actions github-actions bot assigned benelan and geospatialem and unassigned Elijbet Jul 19, 2022
@github-actions
Copy link
Contributor

Installed and assigned for verification.

@geospatialem geospatialem added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Jul 20, 2022
@geospatialem
Copy link
Member

Verified read-only attribute in beta.86 for input-time-picker and input-date-picker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. enhancement Issues tied to a new feature or request.
Projects
None yet
Development

No branches or pull requests

9 participants