]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | /**\r |
2 | * This example shows how to use the date/month pickers.\r | |
3 | */\r | |
4 | Ext.define('KitchenSink.view.form.Date', {\r | |
5 | extend: 'Ext.container.Container',\r | |
6 | xtype: 'form-date',\r | |
7 | \r | |
8 | //<example>\r | |
9 | requires: [\r | |
10 | 'Ext.panel.Panel',\r | |
11 | 'Ext.picker.Date',\r | |
12 | 'Ext.picker.Month',\r | |
13 | 'Ext.layout.container.VBox',\r | |
14 | 'Ext.layout.container.HBox'\r | |
15 | ],\r | |
16 | exampleTitle: 'Date/Month Picking',\r | |
17 | profiles: {\r | |
18 | classic: {\r | |
19 | width: 400\r | |
20 | },\r | |
21 | neptune: {\r | |
22 | width: 465\r | |
23 | },\r | |
24 | 'neptune-touch': {\r | |
25 | width: 600\r | |
26 | },\r | |
27 | 'triton': {\r | |
28 | width: 750\r | |
29 | }\r | |
30 | },\r | |
31 | //</example>\r | |
32 | \r | |
33 | layout: {\r | |
34 | type: 'vbox',\r | |
35 | align: 'center'\r | |
36 | },\r | |
37 | \r | |
38 | width: 500,\r | |
39 | \r | |
40 | items: [{\r | |
41 | xtype: 'container',\r | |
42 | layout: 'hbox',\r | |
43 | margin: '0 0 20 0',\r | |
44 | items: [{\r | |
45 | title: 'Date Picker',\r | |
46 | margin: '0 20 0 0',\r | |
47 | items: {\r | |
48 | xtype: 'datepicker'\r | |
49 | }\r | |
50 | }, {\r | |
51 | title: 'Month Picker',\r | |
52 | items: {\r | |
53 | xtype: 'monthpicker'\r | |
54 | }\r | |
55 | }]\r | |
56 | }, {\r | |
57 | xtype: 'container',\r | |
58 | layout: 'hbox',\r | |
59 | items: [{\r | |
60 | title: 'Date Picker (no today)',\r | |
61 | margin: '0 20 0 0',\r | |
62 | items: {\r | |
63 | xtype: 'datepicker',\r | |
64 | showToday: false\r | |
65 | }\r | |
66 | }, {\r | |
67 | title: 'Month Picker (no buttons)',\r | |
68 | items: {\r | |
69 | xtype: 'monthpicker',\r | |
70 | showButtons: false\r | |
71 | }\r | |
72 | }]\r | |
73 | }],\r | |
74 | \r | |
75 | initComponent: function() {\r | |
76 | this.width = this.profileInfo.width;\r | |
77 | \r | |
78 | this.callParent();\r | |
79 | }\r | |
80 | });\r |