fix some trouble in DateChooser with prototype function in JS