Skip to content

Commit

Permalink
fix: make day event to hourly event after move
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Sittenauer committed Aug 12, 2024
1 parent 87ee244 commit b72fb30
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "react-big-calendar",
"version": "1.13.2",
"description": "Calendar! with events",
"name": "@xetoxyc/react-big-calendar",
"version": "1.0.0",
"description": "Calendar! with events but modified",
"author": {
"name": "Jason Quense",
"email": "[email protected]"
},
"repository": {
"type": "git",
"url": "git+https://github.com/jquense/react-big-calendar.git"
"url": "git+https://github.com/Xetoxyc/react-big-calendar.git"
},
"publishConfig": {
"access": "public",
Expand Down Expand Up @@ -128,7 +128,7 @@
"uncontrollable": "^7.2.1"
},
"bugs": {
"url": "https://github.com/jquense/react-big-calendar/issues"
"url": "https://github.com/xetoxyc/react-big-calendar/issues"
},
"homepage": "https://github.com/jquense/react-big-calendar#readme"
"homepage": "https://github.com/xetoxyc/react-big-calendar#readme"
}
8 changes: 7 additions & 1 deletion src/addons/dragAndDrop/EventContainerWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ class EventContainerWrapper extends React.Component {
)

const { duration } = eventTimes(event, accessors, this.props.localizer)
let newEnd = this.props.localizer.add(newSlot, duration, 'milliseconds')

let newEnd = this.props.localizer.add(
newSlot,
event.allDay ? 60 * 60 * 1000 : duration,
'milliseconds'
)

this.update(event, slotMetrics.getRange(newSlot, newEnd, false, true))
}

Expand Down

0 comments on commit b72fb30

Please sign in to comment.