fixes #3705 Prompting End date even when I enabled no end date

Fixed the issue and pushed code for review, please check it.