u
This commit is contained in:
1 parent
c2c5cc92af
commit
caed43a011
60 files changed
+1710
-1272
No files matched your search
@@ -1,48 +1,39 @@
|
||||
import dayjs from 'dayjs'
|
||||
// DemoADatePicker.tsx
|
||||
import React, { useState } from 'react'
|
||||
import { Button, ScrollView, StyleSheet } from 'react-native'
|
||||
import { ADateTimeDrawer } from '@/components/common/ao'
|
||||
import { DatePicker } from '@yz1311/react-native-wheel-picker'
|
||||
import { useState } from 'react'
|
||||
import { Button, Text, View } from 'react-native'
|
||||
import { ADatePicker } from '@/components/common/ao'
|
||||
|
||||
export default function DemoADatePicker() {
|
||||
export default function Chat() {
|
||||
const [show, setShow] = useState(false)
|
||||
const [date, setDate] = useState(dayjs())
|
||||
return (
|
||||
<ScrollView contentContainerStyle={styles.container}>
|
||||
<ADateTimeDrawer
|
||||
isOpen={show}
|
||||
defaultDate={date}
|
||||
modeType="year-month"
|
||||
onConfirm={(val) => {
|
||||
console.log(val)
|
||||
}}
|
||||
onClose={() => {
|
||||
setShow(false)
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
title="测试"
|
||||
onPress={() => {
|
||||
setShow(!show)
|
||||
}}
|
||||
>
|
||||
</Button>
|
||||
</ScrollView>
|
||||
<>
|
||||
<View className="mt-12">
|
||||
<Button
|
||||
title="测试"
|
||||
onPress={() => {
|
||||
setShow(true)
|
||||
}}
|
||||
>
|
||||
</Button>
|
||||
{/* <DatePicker
|
||||
isModal={true}
|
||||
modalVisible={show}
|
||||
onPickerCancel={() => {
|
||||
setShow(false)
|
||||
}}
|
||||
/> */}
|
||||
|
||||
<ADatePicker
|
||||
show={show}
|
||||
onConfirm={(val) => {
|
||||
setShow(false)
|
||||
}}
|
||||
onClose={() => {
|
||||
setShow(false)
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
</>
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
padding: 20,
|
||||
},
|
||||
label: {
|
||||
marginTop: 20,
|
||||
fontSize: 16,
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
result: {
|
||||
marginVertical: 5,
|
||||
fontSize: 14,
|
||||
color: '#333',
|
||||
},
|
||||
})
|
||||
Reference in new issue
Block a user