Date Picker linked to different text content

hi, thank you for your help. so I used the code but changed the value before toLocaleDateString();:

// For full API documentation, including code examples, visit Velo API Reference - Wix.com
export function myDatePicker_change(event) {
var d = new Date($w(“#myDatePicker”).value);
var newDate = d.setMonth(d.getMonth() - 3);
var d1 = new Date($w(“#myDatePicker”).value);
var newDate1 = d1.setMonth(d1.getMonth() - 4);
var d2 = new Date($w(“#myDatePicker”).value);
var newDate2 = d2.setMonth(d2.getMonth() - 5);

$w("#messageText").text = "Sending invitations should be done by " + d.toLocaleDateString(); 
$w("#messageText2").text = "Sending flowers should be done by " + d1.toLocaleDateString() 
$w("#messageText3").text = "Sending RSVP should be done by " + d2.toLocaleDateString(); 

}

This seems to work fine.

Few questions:

  1. what happens if I want to subtract an amount of days rather than months?
  2. at the moment each text box has “text” “text2” in it which displays until a user selects date and it changes. how can I make it so the text boxes are blank and update/show only once a date is picked ?

Thank you for your help again