fix: UTC-Bug bei Datum-Defaults - new Date().toISOString() durch lokale Formatierung ersetzt
This commit is contained in:
@@ -45,7 +45,11 @@ function BestellungDetail({ id, toast, onBack }) {
|
||||
const [pickerSearch,setPickerSearch]= useState('');
|
||||
const [editMode, setEditMode] = useState(false);
|
||||
const [form, setForm] = useState({ name:'', bemerkung:'', custom_price:'', status:'warteliste' });
|
||||
const today = () => new Date().toISOString().slice(0,10);
|
||||
const today = () => {
|
||||
const d = new Date();
|
||||
const y = d.getFullYear(), m = String(d.getMonth()+1).padStart(2,'0'), day = String(d.getDate()).padStart(2,'0');
|
||||
return `${y}-${m}-${day}`;
|
||||
};
|
||||
const [bezahltDate, setBezahltDate] = useState(today());
|
||||
const [abgeholtDate, setAbgeholtDate] = useState(today());
|
||||
const [showBezahltPicker, setShowBezahltPicker] = useState(false);
|
||||
|
||||
Reference in New Issue
Block a user