Open blerg-rush opened 4 years ago
Expected behavior:
Datepicker retains its value until I change it or reload the page
Actual behavior:
When a print dialog opens and closes, the value of the field is set to ""
""
Environment
Source
<!-- Vue component template --> <div class="datepicker-trigger"> <b-form-group label="Issue Date" label-for="issue-date" class="small-label" > <b-form-input id="datepicker-trigger" placeholder="Select date" :value="toDateString(issueDate)" required /> <AirbnbStyleDatepicker class="overlay" :trigger-element-id="'datepicker-trigger'" :mode="'single'" :fullscreen-mobile="true" :date="issueDate" :key="1" @date-one-selected="val => { issueDate = val }" /> </b-form-group> </div>
// Vue component script computed: { issueDate: { get () { return this.$store.state.invoice.issueDate }, set (value) { this.$store.commit('updateInvoiceIssueDate', value) } } }
// Vuex store state { invoice: { issueDate: null } }, mutations { updateInvoiceIssueDate (state, issueDate) { state.invoice.issueDate = issueDate } }
Expected behavior:
Datepicker retains its value until I change it or reload the page
Actual behavior:
When a print dialog opens and closes, the value of the field is set to
""
Environment
Source