Set initial date and don't use the src from release by the moment.
See original GitHub issueHi everyone!
How do i set a initial date in a string with date format?
I have tried this in the demo, but no luck, even when setting a proper date for input type date (YYYY-MM-DD) in the initial data like this:
{ date: "2018-1-13" }
Also not working with:
{ date: "2018-01-13T00:00:00" }
With time, it works like this:
{ time: "14:00" }
and schema (minimalist example):
{ "$schema": "http://json-schema.org/draft-03/schema#", "type": "object", "properties": { "time": { "type": "string", "format": "time" } } }
If there is no support, I can work on it.
Thanks in advance!
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
Moment.js transform to date object - javascript - Stack Overflow
Use this to transform a moment object into a date object: From http://momentjs.com/docs/#/displaying/as-javascript-date/ moment().toDate();. Yields:
Read more >Working with Moment.js Date Libraries - Section.io
Moment.js is the tool every JavaScript developer wants to use to achieve date and time object with simplicity.
Read more >Docs - Moment.js
Unlike a Moment object, it can not be set to use another time zone; It has no concept of "mode". Using Date.parse ,...
Read more >React custom datepicker: Step-by-step - LogRocket Blog
First, we'll verify the formatting of the date in the calendar module by appending the following code to the src/helpers/calendar.js file:
Read more >The Picture element - HTML: HyperText Markup Language
If providing higher-density versions of an image for high-DPI (Retina) display, use srcset on the <img> element instead. This lets browsers opt ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Eureka, I 've done it! i have modified the lines regarding the value set in brutusin-json-forms.js.
if (value !== null && typeof value !== "undefined") {
(I did my best with the formatting, but i don’t know what is going on).
It will be nice to commit it to master. I tried to make a pull request, but it seems i got to create a new branch, but the interface here is not letting me (maybe using git on a local machine?). Maybe if you help me out, we can get it done.
Thanks!
When setting BrutusinForms.bootstrap.addFormatDecorator(“date”, “date”) before BrutusinForms.create(schema), when form is loaded, form will override the value for the input with date decorator. I will study it to learn how to keep our decorator with our date picker.