How to set date Automatically

I have 2 Date pickers.

I want that when I select date in 1st one, the 2nd Date picker sets its date to exactly one year after (365 days) automatically

Can someone help me with the code

Thanks for reading

Try this

blocks

1 Like

What about leap years?

Maybe this shud work .....

.

1 Like

For non Leap Years, the date picker does not show 29 Feb

This was a trick question for the Original Poster.
The Leap Year question has to be settled with the whoever gave him the assignment, explicitly.

Thank U for your help everbody.
Also I didn't need any leap year functions still thanks

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.