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

Trigger value save on year/month select #395

Merged

Conversation

skjnldsv
Copy link
Contributor

See #137 (comment)
Closes #137

@nextcloud/vue

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
@skjnldsv skjnldsv added the 3. to review Waiting for reviews label May 15, 2019
@skjnldsv skjnldsv added this to the next milestone May 15, 2019
@skjnldsv skjnldsv self-assigned this May 15, 2019
@skjnldsv
Copy link
Contributor Author

🎺

Copy link
Contributor

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

👍

@ChristophWurst ChristophWurst merged commit 882b7ad into master May 16, 2019
@ChristophWurst ChristophWurst deleted the enhancement/datepicker/trigger-save-on-month-or-year branch May 16, 2019 07:21
@skjnldsv skjnldsv added the feature: datepicker Related to the date/time picker component label May 20, 2019
@skjnldsv skjnldsv modified the milestones: next, 0.11.3 May 31, 2019
@skjnldsv
Copy link
Contributor Author

skjnldsv commented Aug 6, 2019

@caugner this actually caused an issue: nextcloud/contacts#1196

Is this needed when you don't use confirm?
In contacts we do use confirm and this pull request actually introduced the bahaviour you described here: mengxiong10/vue2-datepicker#290 (comment)

Now in contacts if you click the year in the header, then select a year, then a month and another date, the year is back to what it previously were.

@caugner
Copy link

caugner commented Aug 6, 2019

@skjnldsv I have passed the question on to the author of vue2-datepicker: mengxiong10/vue2-datepicker#290 (comment)

@caugner
Copy link

caugner commented Aug 26, 2019

@skjnldsv The vue2-datepicker has provided the following fix:

    handleSelectYear(year) {
      let value = this.$refs.datepicker.currentValue;
      if (value) {
        value = new Date(new Date(value).setFullYear(year));
        this.$refs.datepicker.selectDate(value);
      }
    },
    handleSelectMonth(month) {
      let value = this.$refs.datepicker.currentValue;
      if (value) {
        value = new Date(new Date(value).setMonth(month));
        this.$refs.datepicker.selectDate(value);
      }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews feature: datepicker Related to the date/time picker component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Datepicker fixes
3 participants