Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- checkEndDate() {
- if (this.startDate && this.endDate) {
- if (moment(this.startDate).isAfter(moment(this.endDate))) {
- this.startDate = moment(this.endDate).startOf('day').toDate();
- }
- this.checkSameDay();
- }
- }
- checkStartDate() {
- if (this.startDate && this.endDate) {
- if (moment(this.endDate).isBefore(moment(this.startDate))) {
- this.endDate = moment(this.startDate).endOf('day').toDate();
- }
- this.checkSameDay();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement