Selecting Date from Calendar

Let I need to Select 5th December but now is 19 April .
So I have to use how much element exist with if condition

is there any other way like use or True or False or Looping so it can be small or easy