Function loadDateTimeLocal

  • Store the given date and time into the given input element. Everything will be displayed in local time, similar to dateAndTime.toString().

    Going the other way is easy: new Date(input.value).

    Parameters

    • input: HTMLInputElement

      This should be set to "datetime-local".

    • dateAndTime: Date

      The date and time to load into the input.

    • truncateTo: "minutes" | "seconds" | "milliseconds" = "milliseconds"

    Returns void