Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. checkEndDate() {
  2. if (this.startDate && this.endDate) {
  3. if (moment(this.startDate).isAfter(moment(this.endDate))) {
  4. this.startDate = moment(this.endDate).startOf('day').toDate();
  5. }
  6. this.checkSameDay();
  7. }
  8. }
  9.  
  10. checkStartDate() {
  11. if (this.startDate && this.endDate) {
  12. if (moment(this.endDate).isBefore(moment(this.startDate))) {
  13. this.endDate = moment(this.startDate).endOf('day').toDate();
  14. }
  15. this.checkSameDay();
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement