Skip to content

Commit b0e2d37

Browse files
authored
Merge pull request #328 from devforth/AdminForth/786
docs: docs for the afcl DatePicker
2 parents 740f053 + 9999180 commit b0e2d37

File tree

3 files changed

+40
-1
lines changed

3 files changed

+40
-1
lines changed

adminforth/documentation/docs/tutorial/03-Customization/15-afcl.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1783,8 +1783,34 @@ import { JsonViever } from '@/afcl'
17831783
```
17841784
</div>
17851785
<div>
1786-
![Mixed Chart](image-93.png)
1786+
![JSON Viewer](image-93.png)
17871787
</div>
17881788
</div>
17891789

1790+
## Date picker
1791+
1792+
```ts
1793+
import { DatePicker } from '@/afcl';
1794+
const datePickerValue = ref()
1795+
```
1796+
1797+
### Basic
1798+
<div class="split-screen" >
1799+
1800+
<div>
1801+
```html
1802+
<DatePicker
1803+
v-model:datePickerValue="datePickerValue"
1804+
:column="{ type: 'datetime' }"
1805+
label="Pick start"
1806+
/>
1807+
```
1808+
</div>
1809+
<div>
1810+
![Date Picker](image-95.png)
1811+
</div>
1812+
</div>
1813+
1814+
1815+
17901816

8.61 KB
Loading

dev-demo/custom/AfComponents.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,14 @@
279279
@close="() => {}"
280280
/>
281281

282+
<Toggle />
282283

284+
<DatePicker
285+
v-model:valueStart="valueStart"
286+
:column="{ type: 'datetime' }"
287+
label="Pick start"
288+
/>
289+
283290
</div>
284291

285292

@@ -305,7 +312,9 @@ import { Table } from '@/afcl'
305312
import { ProgressBar } from '@/afcl';
306313
import { Skeleton } from '@/afcl';
307314
import { Spinner } from '@/afcl';
315+
import { Toggle } from '@/afcl';
308316
import { IconSearchOutline } from '@iconify-prerendered/vue-flowbite'
317+
import { DatePicker } from '@/afcl';
309318
import CustomRangePicker from "@/components/CustomRangePicker.vue";
310319
import Toast from '@/components/Toast.vue';
311320
@@ -321,8 +330,12 @@ watch(files, (files) => {
321330
const enable = ref(false)
322331
const selected = ref(null)
323332
const selected2 = ref([])
333+
const valueStart = ref()
324334
325335
336+
watch(valueStart, (newVal) => {
337+
console.log('New start value:', newVal);
338+
});
326339
327340
function doSmth(){
328341

0 commit comments

Comments
 (0)