New Calendar Vis - Status?

If you choose the same date on both from and to - The dates are not visible when you view the event (se pic 4)
If you click edit button the dates are visible and correct (se pic 5)
 

Attachments

  • 5.png
    5.png
    17.4 KB · Views: 429
  • 4.png
    4.png
    11.4 KB · Views: 426
Andyo, unfortunately I am going to be unavailable for the next 2 weeks. As you are a professional member I suggest you start a new thread in the professional forum and the boys will help you out.

With regards to the default start and end time this would require a change to the date element. I think it would be easier to simply supply some javascript code on the element and set the time value on load. Try This:

Code:
var eStartDate = this.form.elements.get(this.element.id);
mStartDate = moment(eStartDate.getValue());
eStartDate.set(mStartDate.format('YYYY-MM-DD 18:00:00')

You might need to check if this is a new record, i.e. the time is zero.
 
We can't really do Pro level support on this atm, as it's still under development. I may have some time I can work on it over the next week or so, but it's not going to be the usual 24 hour response level.

-- hugh
 
The basic fullcalendar viz is built. Still a few little issues, but 90%+ done.

Update from github, discover new plugins, and you'll find the fullcalendar viz.

-- hugh
 
I have been working on this plugin for some time, if you run into problems post them here. I have less time to devote to this as I did but I will try and help where I can.
 
Hi achartier, I tried to add your suggestion javascript regarding the default time.

Code (Text):
var eStartDate = this.form.elements.get(this.element.id);
mStartDate = moment(eStartDate.getValue());
eStartDate.set(mStartDate.format('YYYY-MM-DD 18:00:00')

It looks like I get some problems with the "moment" function, and its library script is not loaded, maybe I'm doing this the wrong way.

Any suggestion?
 
Where did you place this javascript? I can access the moment functions in both the advanced tab of the general settings as well as the javascript tab. Have you tried it in Firebug or Chrome developer to see what the error might be?
 
I added the script to Element/Javascript

Script is new to me, but I get this line in Firebug:

Fabrik.blocks['form_57_4'].dispatchEvent('date', 'vacation___to_date', 'load', 'var eStartDate = document.id('vacation___to_date').form.elements.get(document.id('vacation___to_date').element.id);mStartDate = moment(eStartDate.getValue());eStartDate.set(mStartDate.format('YYYY-MM-DD 18:00:00'));');
 
SyntaxError: missing ) after argument list
e());eStartDate.set(mStartDate.format('YYYY-MM-DD 18:00:00')
 
I tried to add ); at the end of the code, then I got this error:
TypeError: document.id(...).form is undefined

TypeError: document.id(...).form is undefined
var eStartDate = document.id('vacation___to_date').form.elements.get(document.id('vacation___to_date').element.id);mStartDate = moment(eStartDate.getValue());eStartDate.set(mStartDate.format('YYYY-MM-DD 18:00:00'));
 
Hi achartier , I have added ); to the end of the code you gave me. So the code I use is now :

var eStartDate = this.form.elements.get(this.element.id);
mStartDate = moment(eStartDate.getValue());
eStartDate.set(mStartDate.format('YYYY-MM-DD 18:00:00'));

This runs without error in the online lint. I dont see any errors in Firebug.
But the form still saves the value as 00:00:00

The Script Tab in Firebug is showing this line:
Fabrik.blocks['form_57_4'].dispatchEvent('date', 'vacation___to_date', 'load', 'var eStartDate = document.id('vacation___to_date').form.elements.get(document.id('vacation___to_date').element.id);mStartDate = moment(eStartDate.getValue());eStartDate.set(mStartDate.format('YYYY-MM-DD 18:00:00'));');

Don't now if it help to see what the problem can be. Thanks for any help.
 
Since I couldn't get this script to work I made a workaround.
The time is only set to 00:00:00 when editing a record and the 'Show time selector' is NO.
I have now set this to YES and hidden the time selector with CSS instead
Code:
fabrikinput.timeField.input-small{
        display:none !important;
}
 
On load, I think 'this' is set to the element's ID, rather than being the actual element object. So you'd need to grab tha actual form block, like ...

var form = Fabrik.getBlock('form_X');

... then use form.formElements...

-- hugh
 
Since I couldn't get this script to work I made a workaround.
The time is only set to 00:00:00 when editing a record and the 'Show time selector' is NO.
I have now set this to YES and hidden the time selector with CSS instead
Code:
fabrikinput.timeField.input-small{
        display:none !important;
}
Andyo, what is your current status on this. I am working on fullcalendar stuff right now so if you can advise where you are I will try and help. Reading back through the items in this thread is a little confusing.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top