Hi there,
I'm currently trying to create a modal which should contain two date input fields to let user choose a period. Since the period is not related to a specific entity I want to render the date fields without passing a model. It seems to me this is currently not possible as the view always complains about the missing model (which I set to null).
Is there any way to render a field view without passing a model instance ?
Just for reference, this is what I'm trying to do:
Thanks in advance!
I'm currently trying to create a modal which should contain two date input fields to let user choose a period. Since the period is not related to a specific entity I want to render the date fields without passing a model. It seems to me this is currently not possible as the view always complains about the missing model (which I set to null).
Is there any way to render a field view without passing a model instance ?
Just for reference, this is what I'm trying to do:
Code:
define('academy:views/modals/date-range-picker', ['views/modal'], function (Dep) { return Dep.extend({ className: 'dialog dialog-record', // template content can be defined right here or externally templateContent: '<div class="startDate">{{{startDate}}}</div><div class="endDate">{{{endDate}}}</div>', setup: function () { this.createView('startDate', 'views/fields/date', { model: null, el: this.getSelector() + ' .startDate' }); this.createView('endDate', 'views/fields/date', { model: null, el: this.getSelector() + ' .endDate' }); }, }) });
Comment