-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Create datetime component for forms (#243)
* chore: Add dayjs as a peer dependency * feat: Add `on-click-outside` modifier * feat: Add initializer for Dayjs plugins * feat: Copy datetime components from existing ember-nrg-ui * feat: Use TypeScript for datetime components * chore: Update next/previous icons * refactor: Update classes and styling * chore: Simplify template * chore: Resolve template linting errors * feat(datetime): Allow parsing of custom formats from input * feat(bound-value): Declare `getDefaultValue` as instance member function * chore: Allow '-**' directories to be imported * chore: Add exports for `Datetime` component * chore: Add tests for `Datetime` component * chore: "Resolve" Glint template type error * feat: Add `Datetime` component to form field * style(calendar): Fix border rounding
- Loading branch information
Showing
22 changed files
with
1,693 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Component from '@glimmer/component'; | ||
import { tracked } from '@glimmer/tracking'; | ||
import Datetime from '@nrg-ui/core/components/form/datetime'; | ||
import bind from '@nrg-ui/core/helpers/bind'; | ||
|
||
export default class extends Component { | ||
@tracked | ||
value; | ||
|
||
<template> | ||
<Datetime class="mt-3" @binding={{bind this "value"}} @type="datetime" /> | ||
</template> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{{page-title "Datetime"}} | ||
|
||
<div class="container mx-auto"> | ||
<F::Form::Datetime /> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.