set year and month in date datepicker bootstrap code example Example: datepicker select date programmatically bootstrap $("#datepicker").datepicker("setDate", new Date);