datetime selector basic function.