MCPcopy
hub / github.com/flatpickr/flatpickr / updateValue

Function updateValue

src/index.ts:2836–2851  ·  view source on GitHub ↗

* Updates the values of inputs associated with the calendar

(triggerChange = true)

Source from the content-addressed store, hash-verified

2834 * Updates the values of inputs associated with the calendar
2835 */
2836 function updateValue(triggerChange = true) {
2837 if (self.mobileInput !== undefined && self.mobileFormatStr) {
2838 self.mobileInput.value =
2839 self.latestSelectedDateObj !== undefined
2840 ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr)
2841 : "";
2842 }
2843
2844 self.input.value = getDateStr(self.config.dateFormat);
2845
2846 if (self.altInput !== undefined) {
2847 self.altInput.value = getDateStr(self.config.altFormat);
2848 }
2849
2850 if (triggerChange !== false) triggerEvent("onValueUpdate");
2851 }
2852
2853 function onMonthNavClick(e: MouseEvent) {
2854 const eventTarget = getEventTarget(e);

Callers 7

initFunction · 0.85
updateTimeFunction · 0.85
onKeyDownFunction · 0.85
minMaxDateSetterFunction · 0.85
selectDateFunction · 0.85
setFunction · 0.85
setDateFunction · 0.85

Calls 2

getDateStrFunction · 0.85
triggerEventFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…