djhi / meteor-autoform-materialize

DEPRECATED - Meteor AutoForm Materialize templates
https://atmospherejs.com/mozfet/autoform-materialize
MIT License
47 stars 29 forks source link

pickadate within an array type, opens a modal within the array div. See image #93

Closed 0o-de-lally closed 7 years ago

0o-de-lally commented 8 years ago

When one uses a pickadate type within an array type, a UI bug appears. The modal appears within a div and the overflow cuts off the calendar box modal. See image for detail.

screen shot 2016-03-18 at 10 00 13 am

Code example:

 sales: {
  type: Array,
  label: "Sales",
  optional: true
},
 'sales.$': {
   type: Object
 },
 'sales.$.value': {
    type: Number,
    label: "Sale Value",
    decimal: true
 },
 'sales.$.timeStamp': {
    label: "Sale Date",
    type: Number,
  autoform: {
      type:"pickadate"
 }
}
0o-de-lally commented 8 years ago

This is a Materialize issue, which happens when the datepicker is attached to a parent element and not the body.

Can be fixed on line 74 with:

   opts = _.defaults(userOptions, {
     format: DEFAULT_PICKADATE_FORMAT_SUBMIT,
     hiddenName: true,
     closeOnSelect: true,
     container: 'body' //solves problem with being inside a a container with overflow https://github.com/Dogfalo/materialize/issues/1032
   });

See here: https://github.com/Dogfalo/materialize/issues/1032

djhi commented 7 years ago

Future work on this package has been transferred here.