Called without any parameters, the value() method returns the selected date from the calendar.
Calling it with a date parameter will force the calendar to navigate to the view which contains the date and to select it.

<div id="calendar" ></div>

<script type="text/javascript">
    $(function () {
            value: new Date(2009, 11, 31)

    $("#calendar").swidget().value(); // return Date(2009, 11, 31)

    $("#calendar").swidget().value(new Date(2019, 11, 31)); // navigates to the view and select a date