How to get the integer value of month from moment.js

前端 未结 1 725
迷失自我
迷失自我 2021-01-28 12:19

I am using Moment.js for adding dates to an option list I am making, so that I can use those dates to show available appointments, for example, someone can select Friday, Februa

相关标签:
1条回答
  • 2021-01-28 12:37

    The line

    GetMonth = GetMonthint++;
    

    is the problem. The ++ operator returns the original value not the incremented value. You should do this:

    GetMonth = GetMonthint + 1;
    
    0 讨论(0)
提交回复
热议问题