minus 1 for month. javascript month starts from 0
changed to .val()