Fixed XULDatePicker reset, optimized code