Skip to content

Commit 47dbec2

Browse files
committed
docs build
1 parent 2e9b0ff commit 47dbec2

File tree

3 files changed

+112
-2
lines changed

3 files changed

+112
-2
lines changed

demo/docs/components.json

Lines changed: 111 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@
13191319
"required": false,
13201320
"description": "Date formatting function",
13211321
"defaultValue": {
1322-
"value": "function(date) {\n return (date.getMonth()+1) +\n '/'+date.getDate() +\n '/'+date.getFullYear();\n}",
1322+
"value": "function(date) {\n if(date){\n return (date.getMonth()+1) +\n '/'+date.getDate() +\n '/'+date.getFullYear();\n }\n}",
13231323
"computed": false
13241324
}
13251325
},
@@ -1390,6 +1390,13 @@
13901390
"computed": false
13911391
}
13921392
},
1393+
"strValue": {
1394+
"type": {
1395+
"name": "string"
1396+
},
1397+
"required": false,
1398+
"description": ""
1399+
},
13931400
"weekDayLabels": {
13941401
"type": {
13951402
"name": "array"
@@ -1414,5 +1421,108 @@
14141421
}
14151422
}
14161423
}
1424+
},
1425+
"SLDSTimepicker": {
1426+
"description": "",
1427+
"displayName": "SLDSTimepicker",
1428+
"props": {
1429+
"formatter": {
1430+
"type": {
1431+
"name": "func"
1432+
},
1433+
"required": false,
1434+
"description": "Time formatting function",
1435+
"defaultValue": {
1436+
"value": "function(date) {\n if(date){\n return date.toLocaleTimeString(navigator.language, {hour: '2-digit', minute:'2-digit'});\n }\n}",
1437+
"computed": false
1438+
}
1439+
},
1440+
"parser": {
1441+
"type": {
1442+
"name": "func"
1443+
},
1444+
"required": false,
1445+
"description": "Parsing date string into Date",
1446+
"defaultValue": {
1447+
"value": "function(timeStr) {\n const date = new Date();\n const dateStr = date.toLocaleString(navigator.language, {year: 'numeric', month: 'numeric', day: 'numeric'});\n return new Date(dateStr+' '+timeStr);\n}",
1448+
"computed": false
1449+
}
1450+
},
1451+
"relativeYearFrom": {
1452+
"type": {
1453+
"name": "number"
1454+
},
1455+
"required": false,
1456+
"description": "",
1457+
"defaultValue": {
1458+
"value": "-5",
1459+
"computed": false
1460+
}
1461+
},
1462+
"relativeYearTo": {
1463+
"type": {
1464+
"name": "number"
1465+
},
1466+
"required": false,
1467+
"description": "",
1468+
"defaultValue": {
1469+
"value": "5",
1470+
"computed": false
1471+
}
1472+
},
1473+
"todayLabel": {
1474+
"type": {
1475+
"name": "string"
1476+
},
1477+
"required": false,
1478+
"description": "",
1479+
"defaultValue": {
1480+
"value": "'Today'",
1481+
"computed": false
1482+
}
1483+
},
1484+
"value": {
1485+
"type": {
1486+
"name": "instanceOf",
1487+
"value": "Date"
1488+
},
1489+
"required": false,
1490+
"description": "Date",
1491+
"defaultValue": {
1492+
"value": "null",
1493+
"computed": false
1494+
}
1495+
},
1496+
"strValue": {
1497+
"type": {
1498+
"name": "string"
1499+
},
1500+
"required": false,
1501+
"description": ""
1502+
},
1503+
"weekDayLabels": {
1504+
"type": {
1505+
"name": "array"
1506+
},
1507+
"required": false,
1508+
"description": "",
1509+
"defaultValue": {
1510+
"value": "[\n 'Sunday','Monday','Tuesday',\n 'Wednesday','Thursday','Friday',\n 'Saturday'\n]",
1511+
"computed": false
1512+
}
1513+
},
1514+
"onDateChange": {
1515+
"defaultValue": {
1516+
"value": "function(date) {\n console.log('onDateChange should be defined');\n}",
1517+
"computed": false
1518+
}
1519+
},
1520+
"placeholder": {
1521+
"defaultValue": {
1522+
"value": "'Pick Time'",
1523+
"computed": false
1524+
}
1525+
}
1526+
}
14171527
}
14181528
}

demo/pages/TimePickerSection.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ class DatepickerSingleSelectSection extends React.Component {
3434
const docs = DOCS["DatepickerSingleSelect"] ? true : false;
3535
return (
3636
<div className='slds-p-around--medium'>
37-
TIME PICKER
3837
<ComponentHeader cmpName="SLDSDatepickerSingleSelect" cmpUrl="http://www.lightningdesignsystem.com/components/datepickers#single-select" />
3938
<div className="copy-text">
4039
{docs ? <p dangerouslySetInnerHTML={this.getDescription()} className="slds-p-vertical--small" style={{ "maxWidth": "800px"}} /> : null}

scripts/component-docs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ var componentNames = [
1414
'SLDSNotification',
1515
'SLDSPopoverTooltip',
1616
'SLDSDatepickerSingleSelect',
17+
'SLDSTimepicker',
1718
//'SLDSGrid',
1819
//'SLDSUtilityIcon',
1920
];

0 commit comments

Comments
 (0)