Kantongku: ganti onChange ke onValueChange+onDismiss (fix deprecation)
This commit is contained in:
@@ -205,10 +205,11 @@ export function AddTransactionScreen() {
|
||||
value={occurredAt}
|
||||
mode="date"
|
||||
maximumDate={new Date()}
|
||||
onChange={(e, d) => {
|
||||
onValueChange={(e, d) => {
|
||||
setShowDate(false);
|
||||
if (d) setOccurredAt(d);
|
||||
}}
|
||||
onDismiss={() => setShowDate(false)}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
||||
@@ -200,10 +200,11 @@ export function EditTransactionScreen() {
|
||||
value={occurredAt}
|
||||
mode="date"
|
||||
maximumDate={new Date()}
|
||||
onChange={(e, d) => {
|
||||
onValueChange={(e, d) => {
|
||||
setShowDate(false);
|
||||
if (d) setOccurredAt(d);
|
||||
}}
|
||||
onDismiss={() => setShowDate(false)}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user