Skip to content

Commit

Permalink
fix: life event creation with unknown month/day (#6046)
Browse files Browse the repository at this point in the history
  • Loading branch information
particleflux authored Mar 8, 2022
1 parent 1e8b309 commit d81123b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/js/components/people/lifeevent/CreateLifeEvent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@ export default {
* Same for the month.
*/
updateDate() {
if (this.selectedDay === 0) {
if (this.selectedDay === 0 || this.selectedDay === '0') {
this.newLifeEvent.happened_at_day_unknown = true;
this.newLifeEvent.happened_at = this.selectedYear + '-' + this.selectedMonth + '-01';
} else if (this.selectedMonth === 0) {
} else if (this.selectedMonth === 0 || this.selectedMonth === '0') {
this.newLifeEvent.happened_at_month_unknown = true;
this.newLifeEvent.happened_at_day_unknown = true;
this.newLifeEvent.happened_at = this.selectedYear + '-01-01';
Expand Down

0 comments on commit d81123b

Please sign in to comment.