fix showing transport in calendar popup
This commit is contained in:
@ -19,7 +19,7 @@ const fetchConfig = async () => {
|
||||
return config.default;
|
||||
};
|
||||
|
||||
export default function AvailabilityForm({ publisherId, existingItems, inline, onDone, date }) {
|
||||
export default function AvailabilityForm({ publisherId, existingItems, inline, onDone, date, datePicker = false }) {
|
||||
|
||||
const router = useRouter();
|
||||
const urls = {
|
||||
@ -428,15 +428,15 @@ export default function AvailabilityForm({ publisherId, existingItems, inline, o
|
||||
<ToastContainer></ToastContainer>
|
||||
<form id="formAv" className="form p-5 bg-white shadow-md rounded-lg" onSubmit={handleSubmit}>
|
||||
<h3 className="text-xl font-semibold mb-5 text-gray-800 border-b pb-2">
|
||||
{editMode ? "Редактирай" : "Нова"} възможност: {common.getDateFormatedShort(day)}
|
||||
{editMode ? "Редактирай" : "Нова"} възможност: {common.getDateFormatedShort(new Date(day))}
|
||||
</h3>
|
||||
|
||||
<LocalizationProvider dateAdapter={AdapterDateFns} localeText={bgBG} adapterLocale={bg}>
|
||||
{/* <div className="mb-2">
|
||||
<DatePicker label="Изберете дата" value={day} onChange={(value) => setDay({ value })} />
|
||||
</div> */}
|
||||
|
||||
|
||||
{datePicker && (
|
||||
<div className="mb-2">
|
||||
<DatePicker label="Изберете дата" value={day} onChange={setDay} />
|
||||
</div>
|
||||
)}
|
||||
<div className="mb-2">
|
||||
<label className="checkbox-container">
|
||||
<input type="checkbox" checked={doRepeat} className="form-checkbox h-5 w-5 text-gray-600 mx-2"
|
||||
|
@ -101,6 +101,7 @@ export default function AvailabilityList({ publisher, showNew }) {
|
||||
inline={true}
|
||||
existingItems={selectedItem ? [selectedItem] : []}
|
||||
date={selectedItem ? new Date(selectedItem.startTime) : new Date()}
|
||||
datePicker={true}
|
||||
onDone={(item) => {
|
||||
toggleAv();
|
||||
setSelectedItem(null);
|
||||
|
Reference in New Issue
Block a user