Uncaught ReferenceError: dates is not defined

77 views
Skip to first unread message

memodev07

unread,
Jul 18, 2013, 6:49:16 PM7/18/13
to backbon...@googlegroups.com
I'm trying to use the Date type in a form, but when I use it I get that error, also I can't use the other data types, this is my schema definition:

schema: {
      creator_name: { type: 'Text',validators: ['required'], title: "Nombre encargado" },
      email: { type: 'Text',validators: ['required', 'email'], title: "Email" },
      telephone: { type: 'Text',validators: ['required'], title: "Teléfono" },
      participant_name: { type: 'Text',validators: ['required'], title: "Nombre participante" },
      title: { type: 'Text', validators: ['required'], title: "Título" },
      genre: { type: 'Text', validators: ['required'], title: "Género" },
      age_range: { type: 'Date', validators: ['required'], title: "Rango de edad" }
    }

Also, I'm using the backbone boilerplate.

* backbone 1.0.0
* backbone-forms 0.12.0
* backbone.layoutmanager 0.9.0-wip
* jquery 2.0.0
* lodash 1.3.1

Charles Davison

unread,
Jul 19, 2013, 4:01:31 AM7/19/13
to backbon...@googlegroups.com
Do any of the datatypes work?


--
You received this message because you are subscribed to the Google Groups "Backbone-forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to backbone-form...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

memodev07

unread,
Jul 19, 2013, 11:13:14 AM7/19/13
to backbon...@googlegroups.com
Only the 'Text' type works, also if I use the Select type it doesn't show any options

Charles Davison

unread,
Jul 19, 2013, 11:23:51 AM7/19/13
to backbon...@googlegroups.com
That's very odd; can you set up a jsfiddle example?  http://jsfiddle.net


memodev07

unread,
Jul 19, 2013, 1:22:50 PM7/19/13
to backbon...@googlegroups.com
Thanks for the help but I already solved the issue, I'm using Backbone Layout Manager and it was trying to manage the form rendering, so I set the manage option to false and this fix it:

Backbone.View.prototype.manage = false;
this.form = new Backbone.Form({
  model: new Participant.Model()
}).render();
Backbone.View.prototype.manage = true;

Thanks :)

El jueves, 18 de julio de 2013 16:49:16 UTC-6, memodev07 escribió:
Reply all
Reply to author
Forward
0 new messages