Reset Date Picker Input Field

I’m having the opposite problem, My Date Picker inside a repeater is connected to a data collection, but it is not showing the associated date value, it is only showing the Placeholder text. I need it to show the value from the database. How do I set the date picker value to the value from the data collection.
Would it work like this?

$w.onReady( function () {
$w(“#datePicker1”).value = $w(‘#itemsDataset’).getCurrentItem().startDate
});