You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: ✨ Add customizable range separator for date range selection in DatePicker
- Introduced `rangeSeparator` prop to allow custom separators in date range formatting.
- Updated `safeDateRangeFormat` to utilize the custom separator.
- Added example for date range selection with a custom separator in documentation.
- Enhanced tests to verify functionality of the new `rangeSeparator` feature.
Closes#4741
it("should return a formatted startDate followed by the provided rangeSeparator when endDate is null",()=>{
1276
+
conststartDate=newDate("2021-04-20 00:00:00");
1277
+
constendDate=undefined;
1278
+
expect(
1279
+
safeDateRangeFormat(startDate,endDate,{
1280
+
...props,
1281
+
rangeSeparator: " to ",
1282
+
}),
1283
+
).toBe("04/20/2021 to ");
1284
+
});
1285
+
1286
+
it("should return a formatted startDate followed by the provided rangeSeparator followed by a formatted endDate when startDate and endDate both have values",()=>{
0 commit comments