When the calendar is displayed and user selects a date, the newPeriod.startDate has the correct date selected by the user but when the next time calendar is displayed newPeriod.startDate or newPeriod.endDate is the current date not the one which user changed when the last time user selected some date.
How can I achieve this? Or is there anything that I’m missing?