I wrapped all the umbraco directives in a "lazy load" idea as presented in the page linked. This to me seems a bit heavy handed for all umb-editor directives on page which if you have a few datepickers, rtes and media pickers (like my page) then it gets quite "array" heavy. I would prefer just to load the directives after the data has arrived.
Is there a better way? e.g. do controllers have constructors that can pull data before the rest of the page loads?
umb-editor datepicker not always displaying the correct date
Hello,
I have a custom editor with a datetime picker on it:
with an angular controller turning it into a datepicker thus:
When my form reloads using values from the database I set the value of the startDatePicker like:
And this works...sometimes. Sometimes the value that is displayed is the initial value of today's date, and sometimes it is the correct value.
And interestingly when I go to resave the form without changing the values retrieved from the database:
is the correct value that I want, albeit what the datepicker is display is the wrong value.
What am I doing wrong that sometimes it displays the correct value and sometimes doesn't?
Help!
My solution I found was here:
https://www.enkelmedia.se/blogg/2013/12/4/umbraco-use-the-rich-text-editor-tinymce-in-a-custom-section/
I wrapped all the umbraco directives in a "lazy load" idea as presented in the page linked. This to me seems a bit heavy handed for all umb-editor directives on page which if you have a few datepickers, rtes and media pickers (like my page) then it gets quite "array" heavy. I would prefer just to load the directives after the data has arrived.
Is there a better way? e.g. do controllers have constructors that can pull data before the rest of the page loads?
is working on a reply...