Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…s-react into add-folder-explorer
  • Loading branch information
joelfmrodrigues committed Mar 9, 2020
2 parents 771a508 + 2322a33 commit 12e5f62
Show file tree
Hide file tree
Showing 7 changed files with 187 additions and 110 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.JSON
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@
"`FilePicker`: Button text overflow fix + global classnames and properties",
"`FieldUserRenderer`: implementation of `api/SP.UserProfiles.PeopleManager/GetPropertiesFor` is not working on on-prem [#468](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/468)",
"`Placeholder`: Placeholder component is not rendering after a string change in it's properties [#469](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/469)",
"`ListView` documentation update: `minWidth` instead of `maxWidth` [#480](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/480)"
"`ListView` documentation update: `minWidth` instead of `maxWidth` [#480](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/480)",
"`DateTimePicker`: Minutes and Seconds validation [#495](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/495)",
"`FilePicker`: bingAPIKey not working [#489](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/489)"
]
},
"contributions": [
"[Alexander Kleshcheov](https://github.com/SharePickle)",
"[Jason S](https://github.com/jason-appliedis)",
"[JonasBjerke89](https://github.com/JonasBjerke89)",
"[Léo Maradan](https://github.com/Leomaradan)",
"[Matej](https://github.com/Matej4386)",
"[mgwojciech](https://github.com/mgwojciech)",
"[Piotr Siatka](https://github.com/siata13)",
Expand Down
252 changes: 150 additions & 102 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions src/controls/dateTimePicker/MinutesComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as strings from 'ControlStrings';
import * as React from 'react';
import { ITimeComponentProps } from './ITimeComponentProps';
import { MaskedTextField } from 'office-ui-fabric-react/lib/TextField';
Expand Down Expand Up @@ -46,8 +47,17 @@ export default class MinutesComponent extends React.Component<ITimeComponentProp
label=""
value={value ? TimeHelper.suffixZero(value.toString()) : "00"}
onGetErrorMessage={(val) => {
onChange(val);
return "";
let message = "";
const minutes: number = parseInt(val);
if (isNaN(minutes)) {
message = strings.DateTimePickerMinuteValueInvalid;
}

if (!message) {
onChange(val);
}

return message;
}}
mask="59"
maskFormat={{
Expand Down
Loading

0 comments on commit 12e5f62

Please sign in to comment.