Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-bsonschema-form

Package Overview
Dependencies
Maintainers
3
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-bsonschema-form - npm Package Compare versions

Comparing version 0.42.30 to 0.42.31

23

lib/components/fields/DateField.js

@@ -25,2 +25,16 @@ 'use strict';

function stringifyDate(_ref) {
var date = _ref.date,
utc = _ref.utc;
if (date == null) {
return date;
}
if (utc) {
return (0, _moment2.default)(date).utc().format('L LT');
} else {
return (0, _moment2.default)(date).format('L LT');
}
}
function cleanValue(value) {

@@ -38,11 +52,16 @@ if (value && typeof value.toDate === 'function') {

readonly = props.readonly,
disabled = props.disabled;
disabled = props.disabled,
uiSchema = props.uiSchema;
var StringField = props.registry.fields.StringField;
var utc = uiSchema['ui:options'].utc;
if (readonly || disabled) {
var formDataString = stringifyDate({ date: formData, utc: utc });
return _react2.default.createElement(StringField, _extends({}, props, {
formData: formData && (0, _moment2.default)(formData).format('L LT') }));
formData: formDataString }));
} else {
return _react2.default.createElement(_reactDatetime2.default, _extends({}, props, {
utc: utc,
input: true,
timeFormat: false,

@@ -49,0 +68,0 @@ value: formData,

2

package.json
{
"name": "react-bsonschema-form",
"version": "0.42.30",
"version": "0.42.31",
"description": "A simple React component capable of building HTML forms out of a JSON schema.",

@@ -5,0 +5,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc