Vamsikrishna
Vamsikrishna

Reputation: 176

Present month in jQuery datepicker

i need to get the present month(i.e(today is 24 July 2013) in 0 to 11 months format ) in jquery UI date picker and store in variable

my variable should contain the following result : var presentmonth =6; how to achieve above ?

Upvotes: 1

Views: 49

Answers (1)

MaVRoSCy
MaVRoSCy

Reputation: 17839

You can use:

var month = $("#datepicker").datepicker('getDate').getMonth();

It will return a value between 0-11

Upvotes: 2

Related Questions