Not overly familiar with regex, I'm working with a custom calendar, and need to be able to parse out the month and year into separate variables.
To get my date, I am using kendo UI's month picker, so I just grab .val on change. Here is my code below, I've managed to get parse out the month, just need to create a regex that will parse out the year into a var called calYear:
$("#MonthPicker").change(function () {
var x = $(this).val();
console.log(x);
var calMonth = x.replace(/\d+/g, '');
console.log(calMonth);
});
Here is my console's output:
November 2013 <-- This is var x
November <-- This is var calMonth
November? What's wrong with your code?