Hi MimiWoodward I'm Cristhian,an independent advisor willing to help thank you for posting your query. I understand you are attempting restore computer to an earlier point using windows 10. This control allows you to select dates from a calendar and optionally the time of day using dropdown controls. You can configure the control to use a 12 or 24-hour clock. See full list on docs.microsoft.com. The following is an example of the date control at runtime. This control supports Microsoft Windows themes. This control can bind to any built-in or custom DateTime field. However, the control does not support any date format setting for the field, nor does it support the select range behavior that is available in the appointment inspector.
Set Date methods let you set date values (years, months, days, hours, minutes, seconds, milliseconds) for a Date Object.
Set Date methods are used for setting a part of a date:
Method | Description |
---|---|
setDate() | Set the day as a number (1-31) |
setFullYear() | Set the year (optionally month and day) |
setHours() | Set the hour (0-23) |
setMilliseconds() | Set the milliseconds (0-999) |
setMinutes() | Set the minutes (0-59) |
setMonth() | Set the month (0-11) |
setSeconds() | Set the seconds (0-59) |
setTime() | Set the time (milliseconds since January 1, 1970) |
The setFullYear()
method sets the year of a date object. In this example to 2020:
The setFullYear()
method can optionally set month and day:
The setMonth()
method sets the month of a date object (0-11):
The setDate()
method sets the day of a date object (1-31):
The setDate()
method can also be used to add days to a date:
If adding days shifts the month or year, the changes are handled automatically by the Date object.
The setHours()
method sets the hours of a date object (0-23):
The setMinutes()
method sets the minutes of a date object (0-59):
The setSeconds()
method sets the seconds of a date object (0-59):
Dates can easily be compared.
The following example compares today's date with January 14, 2100:
JavaScript counts months from 0 to 11. January is 0. December is 11.
For a complete reference, go to our Complete JavaScript Date Reference.
The reference contains descriptions and examples of all Date properties and methods.