There isn’t enough information here to give an answer for your needs.
Where are you trying to do this?
What do you expect to happen?
Does it need to be done in PHP? you see the value after saving? == simple
Does it need to be done in JavaScript? You see the value after selecting dates? == difficult