Skip to content

Conversation

@robinvrd
Copy link

Althought moment.js works well with pikaday.js, it is now deprecated and has to be replaced with an alternative like luxon (basically its successor from same team).

Packages installation

  • ember-auto-import (and webpack) were necessary to use luxon
  • testdouble was causing troubles with webpack and its use was pretty basic (so replaceable)
  • current version of ember-cli-babel was causing issues with webpack

Changes

@lifeart
Copy link

lifeart commented Sep 22, 2021

Hi @robinvrd! Thank you for your work!

Wondering, could it be config option to use? Instead of dropping of moment-js
according to scope of change, looks like we could support both, and use moment or luxon as transitive dependencies

just replacing moment to luxon looks like huge breaking change, and that's MR is not merged or reviewed (likely)

ember-power-calendar has a similar concept, you can use it with moment, luxon or date-fns.

Copy link

@IBRAHIMDANS IBRAHIMDANS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@theme="dark-theme"
@onSelection={{action "doSomethingWithSelectedValue"}}
<PikadayInput
@format="cccc LLLL d yyyy, h:mm:ss a"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need

<PikadayInput
@value={{this.startDate}}
@onSelection={{action (mut this.startDate)}}
@format="dd.LL.yyyy"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need

test('format of the input is changeable', async function(assert) {
this.set('value', new Date(2010, 7, 10));
this.set('format', 'YYYY.DD.MM');
this.set('format', 'yyyy.dd.LL');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants