Skip to content

Commit e7ee975

Browse files
author
zhoss
committed
add datepicker addon
1 parent 5715be1 commit e7ee975

File tree

3 files changed

+229
-206
lines changed

3 files changed

+229
-206
lines changed

demo/bower.json

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,38 @@
1-
{
2-
"name": "demo",
3-
"authors": [
4-
"Saif Jerbi <m.jerbi.saif@gmail.com>"
5-
],
6-
"directory": "src/main/resources/static",
7-
"appPath": "src/main/resources/static",
8-
"description": "this is a demo application using angular schema form and asf java ui library",
9-
"main": "index.html",
10-
"keywords": [
11-
"angular",
12-
"schema",
13-
"form",
14-
"asf",
15-
"java",
16-
"ui",
17-
"java",
18-
"angular"
19-
],
20-
"license": "MIT",
21-
"homepage": "",
22-
"ignore": [
23-
"**/.*",
24-
"node_modules",
25-
"bower_components",
26-
"test",
27-
"tests"
28-
],
29-
"dependencies": {
30-
"angular-schema-form": "^0.8.13",
31-
"angular-schema-form-bootstrap": "^0.2.0",
32-
"bootstrap": "^3.3.7",
33-
"lodash": "^4.17.4"
34-
}
35-
}
1+
{
2+
"name": "demo",
3+
"authors": [
4+
"Saif Jerbi <m.jerbi.saif@gmail.com>"
5+
],
6+
"directory": "src/main/resources/static",
7+
"appPath": "src/main/resources/static",
8+
"description": "this is a demo application using angular schema form and asf java ui library",
9+
"main": "index.html",
10+
"keywords": [
11+
"angular",
12+
"schema",
13+
"form",
14+
"asf",
15+
"java",
16+
"ui",
17+
"java",
18+
"angular"
19+
],
20+
"license": "MIT",
21+
"homepage": "",
22+
"ignore": [
23+
"**/.*",
24+
"node_modules",
25+
"bower_components",
26+
"test",
27+
"tests"
28+
],
29+
"dependencies": {
30+
"jquery": "~3.2.1",
31+
"angular-schema-form": "^0.8.13",
32+
"angular-schema-form-bootstrap": "^0.2.0",
33+
"angular-schema-form-datepicker": "~1.4.1",
34+
"pickadate": "~3.5.6",
35+
"bootstrap": "^3.3.7",
36+
"lodash": "^4.17.4"
37+
}
38+
}
Lines changed: 118 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,118 @@
1-
package io.asfjava.ui.demo.screen;
2-
3-
import java.io.Serializable;
4-
5-
import io.asfjava.ui.core.form.CheckBox;
6-
import io.asfjava.ui.core.form.ComboBox;
7-
import io.asfjava.ui.core.form.Number;
8-
import io.asfjava.ui.core.form.Password;
9-
import io.asfjava.ui.core.form.RadioBox;
10-
import io.asfjava.ui.core.form.TextArea;
11-
import io.asfjava.ui.core.form.TextField;
12-
13-
public class DemoForm implements Serializable {
14-
15-
@TextField(title = "First Name", placeHolder = "Your first name", description = "This is a description for your first name field")
16-
private String firstName;
17-
18-
@TextField(title = "Last Name", placeHolder = "Your last name")
19-
private String lastName;
20-
21-
@TextField(title = "eMail", placeHolder = "Your email", pattern = "^\\S+@\\S+$", validationMessage = "Your mail must be in this format jhondoe@example.com", description = "This is Text Field with pattern and validation message")
22-
private String email;
23-
24-
@Number(title = "Number of children", placeHolder = "Number of children", description = "This is a number")
25-
private Integer number;
26-
27-
@Password(title = "Password", placeHolder = "Please set you password", description = "This is password")
28-
private String password;
29-
30-
@ComboBox(title = "Gender", titleMap = GenderTitleMap.class)
31-
private String gender;
32-
33-
@ComboBox(title = "Currency", values = { "euro", "dollar" })
34-
private String currency;
35-
36-
@RadioBox(title = "Civil State", titleMap = CivilStateTitelsMap.class)
37-
private String civilState;
38-
39-
@TextArea(title = "Address", placeHolder = "Fill your address please", description = "This is textarea")
40-
private String address;
41-
42-
@CheckBox(title = "Color", values = { "red", "bleu", "green" }, defaultvalue = "red")
43-
private String color;
44-
45-
public String getFirstName() {
46-
return firstName;
47-
}
48-
49-
public void setFirstName(String firstName) {
50-
this.firstName = firstName;
51-
}
52-
53-
public String getLastName() {
54-
return lastName;
55-
}
56-
57-
public void setEmail(String eMail) {
58-
this.email = eMail;
59-
}
60-
61-
public String getEmail() {
62-
return email;
63-
}
64-
65-
public void setLastName(String lastName) {
66-
this.lastName = lastName;
67-
}
68-
69-
public Integer getNumber() {
70-
return number;
71-
}
72-
73-
public void setNumber(Integer number) {
74-
this.number = number;
75-
}
76-
77-
public String getPassword() {
78-
return password;
79-
}
80-
81-
public void setPassword(String password) {
82-
this.password = password;
83-
}
84-
85-
public String getGender() {
86-
return gender;
87-
}
88-
89-
public String getAddress() {
90-
return address;
91-
}
92-
93-
public void setAddress(String address) {
94-
this.address = address;
95-
}
96-
97-
public String getCivilState() {
98-
return civilState;
99-
}
100-
101-
public void setCivilState(String civilState) {
102-
this.civilState = civilState;
103-
}
104-
105-
private static final long serialVersionUID = -5073515619469444978L;
106-
}
1+
package io.asfjava.ui.demo.screen;
2+
3+
import java.io.Serializable;
4+
5+
import io.asfjava.ui.core.form.CheckBox;
6+
import io.asfjava.ui.core.form.ComboBox;
7+
import io.asfjava.ui.core.form.DatePicker;
8+
import io.asfjava.ui.core.form.Number;
9+
import io.asfjava.ui.core.form.Password;
10+
import io.asfjava.ui.core.form.RadioBox;
11+
import io.asfjava.ui.core.form.TextArea;
12+
import io.asfjava.ui.core.form.TextField;
13+
14+
public class DemoForm implements Serializable {
15+
16+
@TextField(title = "First Name", placeHolder = "Your first name", description = "This is a description for your first name field")
17+
private String firstName;
18+
19+
@TextField(title = "Last Name", placeHolder = "Your last name")
20+
private String lastName;
21+
22+
@TextField(title = "eMail", placeHolder = "Your email", pattern = "^\\S+@\\S+$", validationMessage = "Your mail must be in this format jhondoe@example.com", description = "This is Text Field with pattern and validation message")
23+
private String email;
24+
25+
@Number(title = "Number of children", placeHolder = "Number of children", description = "This is a number")
26+
private Integer number;
27+
28+
@Password(title = "Password", placeHolder = "Please set you password", description = "This is password")
29+
private String password;
30+
31+
@ComboBox(title = "Gender", titleMap = GenderTitleMap.class)
32+
private String gender;
33+
34+
@DatePicker(title = "Birth Date", format = "yyyy-MM-dd")
35+
private String birthDate;
36+
37+
@ComboBox(title = "Currency", values = { "euro", "dollar" })
38+
private String currency;
39+
40+
@RadioBox(title = "Civil State", titleMap = CivilStateTitelsMap.class)
41+
private String civilState;
42+
43+
@TextArea(title = "Address", placeHolder = "Fill your address please", description = "This is textarea")
44+
private String address;
45+
46+
@CheckBox(title = "Color", values = { "red", "bleu", "green" }, defaultvalue = "red")
47+
private String color;
48+
49+
public String getFirstName() {
50+
return firstName;
51+
}
52+
53+
public void setFirstName(String firstName) {
54+
this.firstName = firstName;
55+
}
56+
57+
public String getLastName() {
58+
return lastName;
59+
}
60+
61+
public void setEmail(String eMail) {
62+
this.email = eMail;
63+
}
64+
65+
public String getEmail() {
66+
return email;
67+
}
68+
69+
public void setLastName(String lastName) {
70+
this.lastName = lastName;
71+
}
72+
73+
public Integer getNumber() {
74+
return number;
75+
}
76+
77+
public void setNumber(Integer number) {
78+
this.number = number;
79+
}
80+
81+
public String getPassword() {
82+
return password;
83+
}
84+
85+
public void setPassword(String password) {
86+
this.password = password;
87+
}
88+
89+
public String getBirthDate() {
90+
return birthDate;
91+
}
92+
93+
public void setBirthDate(String birthDate) {
94+
this.birthDate = birthDate;
95+
}
96+
97+
public String getGender() {
98+
return gender;
99+
}
100+
101+
public String getAddress() {
102+
return address;
103+
}
104+
105+
public void setAddress(String address) {
106+
this.address = address;
107+
}
108+
109+
public String getCivilState() {
110+
return civilState;
111+
}
112+
113+
public void setCivilState(String civilState) {
114+
this.civilState = civilState;
115+
}
116+
117+
private static final long serialVersionUID = -5073515619469444978L;
118+
}

0 commit comments

Comments
 (0)