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

bug: Angular standalone datetime is missing formatOptions property #29464

Closed
3 tasks done
moh4sa opened this issue May 5, 2024 · 4 comments · Fixed by #29468 · May be fixed by YoutacRandS-VA/eth2-beaconchain-explorer-app#2
Closed
3 tasks done

bug: Angular standalone datetime is missing formatOptions property #29464

moh4sa opened this issue May 5, 2024 · 4 comments · Fixed by #29468 · May be fixed by YoutacRandS-VA/eth2-beaconchain-explorer-app#2
Labels
package: angular @ionic/angular package type: bug a confirmed bug report

Comments

@moh4sa
Copy link

moh4sa commented May 5, 2024

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

Can't bind to 'formatOptions' since it isn't a known property of 'ion-datetime'.

Expected Behavior

works as expected on docs

Steps to Reproduce

add [formatOptions]="{ time: { hour: '2-digit', minute: '2-digit' }, date: { day: '2-digit', month: 'long' }, } property to <ion-datetime> </<ion-datetime>

Code Reproduction URL

https://github.com/moh4sa/dateTimeIssue

Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 8.1.0
@angular-devkit/build-angular : 17.3.6
@angular-devkit/schematics : 17.3.6
@angular/cli : 17.3.6
@ionic/angular-toolkit : 11.0.1

Capacitor:

Capacitor CLI : 6.0.0
@capacitor/android : 6.0.0
@capacitor/core : 6.0.0
@capacitor/ios : 6.0.0

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v20.9.0 (/usr/local/bin/node)
npm : 10.7.0
OS : macOS Unknown

Additional Information

No response

@sean-perkins
Copy link
Contributor

@moh4sa please double check the reproduction link provided. It links to a blank node example.

When creating or linking a reproduction, please verify you are importing either the IonDatetime component if using standalone components or the IonicModule if using modules. This is required for binding camel case properties with Ionic's components in Angular.

@sean-perkins sean-perkins added the needs: reply the issue needs a response from the user label May 6, 2024
@ionitron-bot ionitron-bot bot removed the triage label May 6, 2024
@moh4sa
Copy link
Author

moh4sa commented May 6, 2024

@sean-perkins check this repo which will demonstrate the binding issue https://github.com/moh4sa/dateTimeIssue
I think it only happens standalone component

@ionitron-bot ionitron-bot bot added triage and removed needs: reply the issue needs a response from the user labels May 6, 2024
@sean-perkins
Copy link
Contributor

Hello @moh4sa, really appreciate the reproduction 🙏 this is a bug. I'll open a PR to address this.

@sean-perkins sean-perkins changed the title bug: Can't bind to 'formatOptions' since it isn't a known property of 'ion-datetime'. bug: Angular standealone datetime is missing formatOptions property May 6, 2024
@sean-perkins sean-perkins added package: angular @ionic/angular package type: bug a confirmed bug report labels May 6, 2024
@ionitron-bot ionitron-bot bot removed triage labels May 6, 2024
@sean-perkins sean-perkins changed the title bug: Angular standealone datetime is missing formatOptions property bug: Angular standalone datetime is missing formatOptions property May 6, 2024
github-merge-queue bot pushed a commit that referenced this issue May 6, 2024
Issue number: resolves #29464

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

The standalone component for `ion-datetime` is missing the
`formatOptions` property. This component wrapper is manually maintained
and was missed when developing the feature.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Adds the missing `formatOptions` property to the `ion-datetime` for
the angular standalone component

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
Copy link

ionitron-bot bot commented Jun 5, 2024

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Jun 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.