Skip to content

Commit 4bf4d98

Browse files
authored
Merge pull request #12 from reorx/copilot/fix-11
Fix partial date support in JSON Editor
2 parents 6e0e350 + 2458445 commit 4bf4d98

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

sample.cv.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,21 @@
2828
]
2929
},
3030
"work": [
31+
{
32+
"name": "Nucleus Labs",
33+
"location": "San Francisco, CA",
34+
"description": "AI-powered data optimization company",
35+
"position": "Senior Engineering Manager",
36+
"url": "http://nucleuslabs.example.com",
37+
"startDate": "2023-01",
38+
"endDate": null,
39+
"summary": "Currently leading a team of engineers developing next-generation AI algorithms for data compression and optimization.",
40+
"highlights": [
41+
"Architected scalable ML pipelines processing 10TB+ daily",
42+
"Built and mentored a team of 12 engineers",
43+
"Launched 3 major product features used by Fortune 500 clients"
44+
]
45+
},
3146
{
3247
"name": "Pied Piper",
3348
"location": "Palo Alto, CA",

schema/jsoncv.schema.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"iso8601": {
66
"type": "string",
77
"description": "e.g. 2014-06-29",
8-
"format": "date",
98
"pattern": "^([1-2][0-9]{3}-[0-1][0-9]-[0-3][0-9]|[1-2][0-9]{3}-[0-1][0-9]|[1-2][0-9]{3})$"
109
}
1110
},

src/editor/main.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ for (const [key, format] of Object.entries(keyFormatMap)) {
102102
objectPath.get(jsoncvSchema.properties, key).format = format
103103
}
104104

105+
// Override date format to use text input instead of HTML date input
106+
// This allows partial dates (YYYY, YYYY-MM, YYYY-MM-DD) as supported by the schema pattern
107+
jsoncvSchema.definitions.iso8601.format = 'text'
108+
105109
// change schema title
106110
jsoncvSchema.title = 'CV Schema'
107111

0 commit comments

Comments
 (0)