MCPcopy Create free account
hub / github.com/Lobos/react-ui / formatValue

Method formatValue

src/Datepicker/Datetime.js:92–104  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

90 }
91
92 formatValue (value) {
93 if (this.props.format) {
94 return datetime.format(value, this.props.format);
95 }
96
97 let format = datetime.getDatetime;
98 if (this.props.type === DATE) {
99 format = datetime.getDate;
100 } else if (this.props.type === TIME) {
101 format = datetime.getTime;
102 }
103 return format(value);
104 }
105
106 open () {
107 if (this.props.readOnly || this.state.active) {

Callers 4

getValueMethod · 0.95
constructorFunction · 0.80
setValueFunction · 0.80
Datetime.jsFile · 0.80

Calls 1

formatFunction · 0.50

Tested by

no test coverage detected