dates:'yyyy-mm-dd', $("#pickdate").val($.datepick.formatDate(date)); like this command but showing error Uncaught TypeError: date.getMonth is not a functio like this