show booking date range on admin booking page

This commit is contained in:
Thomas Ruoff
2020-11-06 23:59:21 +01:00
parent 088ca3ea5b
commit e80c095770
2 changed files with 3 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
import React, { useContext } from 'react' import React from 'react'
import classnames from 'classnames' import classnames from 'classnames'
import { import {
isPast, isPast,
@@ -94,6 +94,7 @@ export default function PlainCalendar({
<div className={className}> <div className={className}>
<h2 className="text-xl">Belegungsplan</h2> <h2 className="text-xl">Belegungsplan</h2>
<Calendar <Calendar
activeStartDate={startDate}
minDate={new Date()} minDate={new Date()}
// @ts-ignore // @ts-ignore
onClickDay={(date: Date, event: React.MouseEvent<HTMLInputElement>) => { onClickDay={(date: Date, event: React.MouseEvent<HTMLInputElement>) => {

View File

@@ -81,7 +81,7 @@ export default function ShowBookingAdmin({
<Header /> <Header />
<main className="flex-grow"> <main className="flex-grow">
<h2 className="text-3xl">Buchung {booking.uuid}</h2> <h2 className="text-3xl">Buchung {booking.uuid}</h2>
<Calendar /> <Calendar start={booking.startDate} end={booking.endDate} />
<div> <div>
<strong>Buchungszeitraum:</strong>{' '} <strong>Buchungszeitraum:</strong>{' '}
{dateFormatFrontend(new Date(booking.startDate))} -{' '} {dateFormatFrontend(new Date(booking.startDate))} -{' '}