Merge branch 'production'
This commit is contained in:
@ -428,13 +428,14 @@ 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 ? "Редактирай" : "Нова"} възможност
|
||||
{editMode ? "Редактирай" : "Нова"} възможност: {common.getDateFormatedShort(day)}
|
||||
</h3>
|
||||
|
||||
<LocalizationProvider dateAdapter={AdapterDateFns} localeText={bgBG} adapterLocale={bg}>
|
||||
<div className="mb-2">
|
||||
{/* <div className="mb-2">
|
||||
<DatePicker label="Изберете дата" value={day} onChange={(value) => setDay({ value })} />
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
|
||||
<div className="mb-2">
|
||||
<label className="checkbox-container">
|
||||
|
@ -357,6 +357,12 @@ exports.getDateFormated = function (date) {
|
||||
return `${dayOfWeekName} ${day} ${monthName} ${year} г.`;
|
||||
}
|
||||
|
||||
exports.getDateFormatedShort = function (date) {
|
||||
const day = date.getDate();
|
||||
const monthName = exports.getMonthName(date.getMonth());
|
||||
return `${day} ${monthName}`;
|
||||
}
|
||||
|
||||
|
||||
exports.getTimeFomatted = function (date) {
|
||||
return date.toLocaleTimeString('en-US', { hour12: false, hour: '2-digit', minute: '2-digit', timeZone: 'Europe/Sofia' });//timeZone: 'local'
|
||||
|
Reference in New Issue
Block a user