Skip to content

Commit

Permalink
Merge pull request #67 from juanruben/master
Browse files Browse the repository at this point in the history
Add function to format DatePanel dates
  • Loading branch information
shahabyazdi authored Sep 23, 2021
2 parents d3f04bf + 93fdd56 commit 9fb07a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/date_panel/date_panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default function DatePanel({
markFocused,
focusedClassName = "",
handleFocusedDate,
formatFunction,
...props
}) {
let headers = { en: "Dates", fa: "تاریخ ها", ar: "تواریخ", hi: "खजूर" },
Expand Down Expand Up @@ -130,7 +131,7 @@ export default function DatePanel({
}
style={{ cursor: object.date ? "pointer" : "default" }}
>
{object.format}
{formatFunction ? formatFunction(object.format) : object.format}
</span>
{object.date && removeButton && (
<button
Expand Down

0 comments on commit 9fb07a0

Please sign in to comment.