added support for picking date only or time only