generate date button working