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

Share details tab - fix expiration date input #40

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/mixins/SharesMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
return true
},

/**

Check warning on line 177 in src/mixins/SharesMixin.js

View workflow job for this annotation

GitHub Actions / eslint

JSDoc @return declaration present but return expression not available in function
* @param {string} date a date with YYYY-MM-DD format
* @return {Date} date
*/
Expand Down Expand Up @@ -204,6 +204,9 @@
*/
onExpirationChange(date) {
try {
// Date.UTC marks years between 0 and 99 as '1900 + year' forcing error and incorrect date value
// thus we need to skip formatting while user is typing year in the input field
if (date.getFullYear() <= 99) return
this.share.expireDate = this.formatDateToString(new Date(date))
} catch (error) {}
},
Expand Down
Loading