use format and inputFormat

using inputFormat property instead of hardcoded format for view date in input