Skip to content

Commit

Permalink
Merge branch 'master' of github.com:xola/ui-kit into X2-6577
Browse files Browse the repository at this point in the history
* 'master' of github.com:xola/ui-kit:
  2.1.18
  X2-6916 Datepicker for same day shows text in white (v2.1.15) (xola#264)
  X2-7088: Revert changes which are breaking selenium (xola#265)
  • Loading branch information
rushi committed Sep 20, 2023
2 parents d7d5e95 + e59f83f commit ac91f89
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xola/ui-kit",
"version": "2.1.17",
"version": "2.1.18",
"description": "Xola UI Kit",
"license": "MIT",
"files": [
Expand Down
1 change: 0 additions & 1 deletion src/components/Buttons/SubmitButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export const SubmitButton = ({

return (
<Button
type="submit"
color={color}
disabled={showTransition || disabled}
variant={variant}
Expand Down
4 changes: 3 additions & 1 deletion src/components/DatePicker/DatePicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ export const DatePicker = ({

// Comparing `from` and `to` dates hides a weird CSS style when you select the same date twice in a date range.
const useDateRangeStyle = isRangeVariant && value.from?.getTime() !== value.to?.getTime();
// Return the same value if it is already dayjs object or has range variant otherwise format it to dayJs object
const selectedDays = dayjs.isDayjs(value) || isRangeVariant ? value : dayjs(value).toDate();

return (
<>
Expand Down Expand Up @@ -189,7 +191,7 @@ export const DatePicker = ({
modifiers.waitlist ? "has-custom-content" : null,
)}
todayButton={variant === "single" ? "Today" : undefined}
selectedDays={value}
selectedDays={selectedDays}
month={currentMonth}
modifiers={{ ...modifiers, ...rangeModifier }}
numberOfMonths={isRangeVariant ? 2 : 1}
Expand Down

0 comments on commit ac91f89

Please sign in to comment.