Skip to content

Instantly share code, notes, and snippets.

@StErMi
Created April 6, 2017 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StErMi/30d7b65fbf338c2d440a74fb45ce7834 to your computer and use it in GitHub Desktop.
Save StErMi/30d7b65fbf338c2d440a74fb45ce7834 to your computer and use it in GitHub Desktop.
openui5-flatpickr Methods
Name Description
clear Resets the selected dates (if any) and clears the input
open Shows/opens the calendar
close Closes the calendar
destroy Destroys the Flatpickr instance, cleans up - removes event listeners, restores inputs, etc
formatDate Return a formatted date
jumpToDate Sets the calendar view to the year and month ofdate, which can be a date string, a Date, or nothing. If date is undefined, the view is set to the latest selected date, the minDate, or today’s date
parseDate Parses a date string or a timestamp, and returns a Date
redraw Redraws the calendar. Shouldn’t be necessary in most cases
setDate Sets the current selected date(s) todate, which can be a date string, a Date, or an Array of the Dates. Optionally, pass true as the second argument to force any onChange events to fire
toggle Shows/opens the calendar if its closed, hides/closes it otherwise
getSelectedDates Return an array with selected dates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment