Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date(range)picker broken in Umbraco 7.4 #45

Open
Bl0kkie opened this issue Feb 15, 2016 · 12 comments
Open

Date(range)picker broken in Umbraco 7.4 #45

Bl0kkie opened this issue Feb 15, 2016 · 12 comments

Comments

@Bl0kkie
Copy link

Bl0kkie commented Feb 15, 2016

The datepicker (for picking a range) in all dataviews are broken at this moment.

@hyrmedia
Copy link

hyrmedia commented Mar 2, 2016

I can confirm that this is true for me as well. Clicking the datepicker button does nothing.

When reloading the Analytics > Views page, Chrome records the following error in the console:

angular.min.js?cdv=890644410:63 TypeError: Cannot read property '_weekdaysMin' of undefined
at new DateRangePicker (http://umbraco-dev.netdocuments.com/App_Plugins/UmbracoForms/Assets/daterangepicker/daterangepicker.js?cdv=890644410:45:39)
at HTMLDivElement.<anonymous> (http://umbraco-dev.netdocuments.com/App_Plugins/UmbracoForms/Assets/daterangepicker/daterangepicker.js?cdv=890644410:871:44)
at Function.x.extend.each (http://umbraco-dev.netdocuments.com/umbraco/lib/jquery/jquery.min.js?cdv=890644410:4:4575)
at x.fn.x.each (http://umbraco-dev.netdocuments.com/umbraco/lib/jquery/jquery.min.js?cdv=890644410:4:1626)
at $.fn.daterangepicker (http://umbraco-dev.netdocuments.com/App_Plugins/UmbracoForms/Assets/daterangepicker/daterangepicker.js?cdv=890644410:868:14)
at HTMLDocument.<anonymous> (http://umbraco-dev.netdocuments.com/App_Plugins/Analytics/backoffice/analyticstree/directives/daterangepicker.directive.js?cdv=890644410:12:25)
at l (http://umbraco-dev.netdocuments.com/umbraco/lib/jquery/jquery.min.js?cdv=890644410:4:24882)
at Object.c.add [as done] (http://umbraco-dev.netdocuments.com/umbraco/lib/jquery/jquery.min.js?cdv=890644410:4:25192)
at x.fn.x.ready (http://umbraco-dev.netdocuments.com/umbraco/lib/jquery/jquery.min.js?cdv=890644410:4:1685)
at x.fn.x.init (http://umbraco-dev.netdocuments.com/umbraco/lib/jquery/jquery.min.js?cdv=890644410:4:1243)  

<div ng-model="dateFilter" date-range-picker="" class="date-filter pull-right ng-isolate-scope ng-scope ng-pristine ng-valid">

Hope this helps..

@KirschnerMatt
Copy link

I'm getting the same error on 7.4.3

@KirschnerMatt
Copy link

Why is the package trying to pull the daterangepicker js file from Umbraco Forms? I wonder if there's a conflict between Analytics and the Umbraco Forms package.

@jdcuster
Copy link

Has anyone found a fix to this they can share? If not, I'll start working on it as time permits.

@jdcuster
Copy link

jdcuster commented Jan 14, 2017

I found the fix for this issue. The issue is in the daterangepicker.js file:
https://github.com/warrenbuckley/Analytics/blob/develop/Analytics/App_Plugins/Analytics/lib/daterangepicker/daterangepicker.js#L45

Replace lines 45 and 46 with the following:

daysOfWeek: moment.weekdaysMin(),
monthNames: moment.monthsShort(),

I'll add this to a new PR shortly.

@warrenbuckley
Copy link
Member

I need to sit down tomorrow or tonight if (time allows) to test & verify this works as expected.
Moment JS, date formats & locales along with some similar conflicts I had with this datepicker in the Forms codebase & the version of MomentJS in Umbraco core.

So will need a few different checks before I pull in the PR @jdcuster

@jdcuster
Copy link

Sounds good. It was tested with 7.5.6. This was the first version I tried the package with but it seems datepicker hasn't been working correctly since 7.4 so I assumed the issue was the result of a moment.js update in the core.

Either way - let me know if I can help with anything.

@edgarJakob
Copy link

I tried the fix but it did not work for me. Any news on this issue?

@jdcuster
Copy link

jdcuster commented Jul 7, 2017

@edgarJakob - sorry just seeing this now - but did you do a cache flush to see if that worked?

@edgarJakob
Copy link

edgarJakob commented Jul 8, 2017 via email

@jonnyflano
Copy link

Thanks guys. I had this date picker issue also but found I needed to install the "Diplo DateRange Picker (V1.2)" package also.

@robgha01
Copy link

robgha01 commented Jul 4, 2018

@warrenbuckley Hey, i fixed and tested the issue heres the pull request: #59

according to this mindblaze/foundation-daterangepicker#3 thay changed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants