Add fix for create event type modal (#878)
Co-authored-by: Alex Johansson <alexander@n1s.se>
This commit is contained in:
parent
32567c8e80
commit
33a683d4b0
1 changed files with 11 additions and 3 deletions
|
@ -15,7 +15,7 @@ dayjs.extend(utc);
|
||||||
export default function Troubleshoot({ user }: inferSSRProps<typeof getServerSideProps>) {
|
export default function Troubleshoot({ user }: inferSSRProps<typeof getServerSideProps>) {
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
const [availability, setAvailability] = useState([]);
|
const [availability, setAvailability] = useState([]);
|
||||||
const [selectedDate] = useState(dayjs());
|
const [selectedDate, setSelectedDate] = useState(dayjs());
|
||||||
|
|
||||||
function convertMinsToHrsMins(mins: number) {
|
function convertMinsToHrsMins(mins: number) {
|
||||||
let h = Math.floor(mins / 60);
|
let h = Math.floor(mins / 60);
|
||||||
|
@ -55,9 +55,17 @@ export default function Troubleshoot({ user }: inferSSRProps<typeof getServerSid
|
||||||
<Shell
|
<Shell
|
||||||
heading="Troubleshoot"
|
heading="Troubleshoot"
|
||||||
subtitle="Understand why certain times are available and others are blocked.">
|
subtitle="Understand why certain times are available and others are blocked.">
|
||||||
<div className="bg-white max-w-md overflow-hidden shadow rounded-sm">
|
<div className="bg-white max-w-xl overflow-hidden shadow rounded-sm">
|
||||||
<div className="px-4 py-5 sm:p-6">
|
<div className="px-4 py-5 sm:p-6">
|
||||||
Here is an overview of your day on {selectedDate.format("D MMMM YYYY")}:
|
Here is an overview of your day on{" "}
|
||||||
|
<input
|
||||||
|
type="date"
|
||||||
|
className="inline border-none h-8 p-0"
|
||||||
|
defaultValue={selectedDate.format("YYYY-MM-DD")}
|
||||||
|
onBlur={(e) => {
|
||||||
|
setSelectedDate(dayjs(e.target.value));
|
||||||
|
}}
|
||||||
|
/>
|
||||||
<small className="block text-neutral-400">
|
<small className="block text-neutral-400">
|
||||||
Tip: Hover over the bold times for a full timestamp
|
Tip: Hover over the bold times for a full timestamp
|
||||||
</small>
|
</small>
|
||||||
|
|
Loading…
Reference in a new issue