Meteor-Community-Packages / meteor-autoform-bs-datepicker

Custom "bootstrap-datepicker" input type for AutoForm
MIT License
25 stars 32 forks source link

Auto Close Not Closing #20

Closed edpeeler closed 7 years ago

edpeeler commented 9 years ago

When selecting a date from a prior or subsequent month, the date picker widget does not close. This issue does not occur when selecting a date from the current month.

wuzhuzhu commented 9 years ago

In my case is all the same

edpeeler commented 9 years ago

Were you using the latest version of meteor?  This behavior didn't manifest until I did the last update. 

Here is the template:  {{#autoForm collection="Wos" id="newWoa" type="insert"}}   {{>hdr}}    

      {{> afQuickField name="name"}}       {{> afQuickField name="sdate" type="bootstrap-datepicker"}}       {{> afQuickField name="woNum"}}       {{> afQuickField name="make"}}       {{> afQuickField name="model"}}       {{> afQuickField name="snum"}}       {{> afQuickField name="phone"}}       {{> afQuickField name="tech"}}       {{> afQuickField name="hrMeter"}}       {{> afQuickField name="complaint" rows=5}}    
  {{/autoForm}}

 Ed Peeler San Francisco, CA From: wuzhuzhu notifications@github.com To: aldeed/meteor-autoform-bs-datepicker meteor-autoform-bs-datepicker@noreply.github.com Cc: edpeeler edpeeler@pacbell.net Sent: Monday, April 13, 2015 6:03 PM Subject: Re: [meteor-autoform-bs-datepicker] Auto Close Not Closing (#20)

In my case is all the same— Reply to this email directly or view it on GitHub.

joerodrig commented 9 years ago

I have this issue as well with all datepicker inputs

tbbooher commented 9 years ago

agreed, me too

ravish-tech commented 9 years ago

It does work for me. I provided the autoclose option in the collection:

    deliverydate: {
        type: Date,
        label: 'Delivery Date',
        autoform: {
            afFieldInput: {
                type: "bootstrap-datepicker",
                "data-date-autoclose": "true"
            }
        }
    }

Autoclose works for any month.

Madsn commented 9 years ago

I have this issue as well. The fix suggested by @ravishhacker doesn't work for me. If I click a date, it closes correctly, but if I initially click anything other than a date, it won't close and I have to reload the page.

frenchbread commented 8 years ago

Also had this issue, "data-date-autoclose": "true" option worked for me! Thanks @ravishhacker

steven-tib commented 8 years ago

Having the same issue, the fix from @ravishhacker solves it partially only. As mentionned by @Madsn when we click somewhere else in the datepicker, e.g. the month at the top which zooms out to months view, then its impossible to close it without reloading the page.

@frenchbread do you have this same behavior or is it working perfectly in all conditions for you ?

frenchbread commented 8 years ago

@steven-tib Haven't tried it since then, but as I recall, I did not get it working in the end. The "data-date-autoclose": "true" setting worked for me once but then, even with this option set, datepicker didn't auto-close (like at all). Probably the issue was caused by using multiple fields with datepicker in the form IMHO.

I ended up removing autoform and building form manually using bootstrap-datepicker

steven-tib commented 8 years ago

thanks @frenchbread for your quick reply, I guess I will try to find another solution then.

aldeed commented 7 years ago

I don't see this issue in the latest version. Closing until someone can post an example app that reproduces the issue.