Added rangeConjunction by Roywcm · Pull Request #3049 · flatpickr/flatpickr · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions __tests__/src/index.spec.ts
8 changes: 7 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2826,10 +2826,16 @@ function FlatpickrInstance(
.join(
self.config.mode !== "range"
? self.config.conjunction
: self.l10n.rangeSeparator
: getDateRangeSeparator()
);
}

function getDateRangeSeparator() {
return typeof self.config.rangeConjunction === "string"
? self.config.rangeConjunction
: self.l10n.rangeSeparator;
}

/**
* Updates the values of inputs associated with the calendar
*/
Expand Down
8 changes: 8 additions & 0 deletions src/types/options.ts