Added database query. Modified jQuery datepicker date type.