updating the collapse ternary logic to work with the datetime picker