Bug #1773: fix responsive datepicker issues, fix 'unsafe value' error