Try adding the following line below the append method call (as well as retaining the call you already have): $("#datepicker").datepicker({dateFormat: 'yy-mm-dd'});