ok, I figure it out by using tostring method. now how can I force a check for each month, lets say the user enter 28 for january, it should show an error and only accept 31. and so on for the other months.

or Date class? I am not an expert but you might need computation like, to get last day of febuary you need a date which is March 1, <chosen year> then minus 1 day so the result will be the last day of febuary