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

Datepicker fixes #137

Closed
4 of 6 tasks
skjnldsv opened this issue Nov 29, 2018 · 9 comments · Fixed by #395
Closed
4 of 6 tasks

Datepicker fixes #137

skjnldsv opened this issue Nov 29, 2018 · 9 comments · Fixed by #395
Labels
1. to develop Accepted and waiting to be taken care of bug Something isn't working enhancement New feature or request feature: datepicker Related to the date/time picker component

Comments

@skjnldsv
Copy link
Contributor

skjnldsv commented Nov 29, 2018

  • Days of the week should have same colour as disabled days
  • More padding on the headers
  • Arrows with the same design as the original datepicker
  • OK button with better wording
  • Wrap it
  • Automatically use the provider locale from nc
@skjnldsv skjnldsv added bug Something isn't working enhancement New feature or request 1. to develop Accepted and waiting to be taken care of feature: datepicker Related to the date/time picker component labels Nov 29, 2018
@georgehrke
Copy link
Contributor

georgehrke commented Dec 1, 2018

  • support dark mode 😉

@caugner
Copy link

caugner commented Apr 7, 2019

  • Support changing the month without having to choose the day again
  • Support changing the year without having to choose month and day again

@skjnldsv
Copy link
Contributor Author

skjnldsv commented Apr 7, 2019

@caugner
Copy link

caugner commented Apr 7, 2019

Thanks @skjnldsv, I just did that: mengxiong10/vue2-datepicker#290

@caugner
Copy link

caugner commented Apr 10, 2019

@skjnldsv The author of vue2-datepicker has suggested the following solution (requires v2.11.0 or later) to support changing month and year individually:

<template>
  <div id="app">
    <date-picker
      @select-year="handleSelectYear"
      @select-month="handleSelectMonth"
      v-model="value"
      lang="en"
      ref="datepicker"
      confirm
    ></date-picker>
  </div>
</template>

<script>
import DatePicker from "vue2-datepicker";

export default {
  name: "App",
  components: { DatePicker },
  data() {
    return {
      value: null
    };
  },
  methods: {
    handleSelectYear(year) {
      if (this.value) {
        const value = new Date(new Date(this.value).setFullYear(year));
        this.$refs.datepicker.selectDate(value);
      }
    },
    handleSelectMonth(month) {
      if (this.value) {
        const value = new Date(new Date(this.value).setMonth(month));
        this.$refs.datepicker.selectDate(value);
      }
    }
  }
};
</script>

@skjnldsv
Copy link
Contributor Author

@caugner can you implement the changes on contacts then? :)

@caugner
Copy link

caugner commented Apr 10, 2019

@skjnldsv Sure, will submit a PR these days. Any reason not to implement it in nextcloud-vue?
(If a user changes the year and presses "OK", I would expect the date to change, not only in the Contacts app.)

@skjnldsv
Copy link
Contributor Author

@caugner Good question, I assumed it was just a matter or binding the year/month event to update contact which was, well, a contact issue.
But looking at your code it's probably a good idea to implement this here.
Though there is an option to use (we do in contacts) which is confirm and require the user to validate the change, so I don't see how it will play out with the event which is on select 🤔

@skjnldsv
Copy link
Contributor Author

@caugner any update? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug Something isn't working enhancement New feature or request feature: datepicker Related to the date/time picker component
Projects
None yet
3 participants