edit calendar in input date and some bugs