#1173 update datepicker function