This is my first angular js site so please excuse my ignorance.
I've added a ui.boostrap
popup datepicker to my page which works perfectly except it appears the dateDisabled method never gets hit.
My markup looks like the following:
<input id="inputWeekEnding"
type="text"
class="form-control"
uib-datepicker-popup="mediumDate"
ng-model="vm.weekEnding"
is-open="vm.weekEndingOpen.opened"
ng-required="true"
close-text="Close"
date-options="vm.dateOptions"
ng-change="vm.weekEndingChanged()"/>
and my controller:
vm.dateOptions = {
dateDisabled: function (data) {
var date = data.date,
mode = data.mode;
return (mode === 'day' && (date.getDay() !== 0));
}
};
I've even tried hardcoding the return true and still no dates are disabled. I've seen this work on a variety of different plunkers so I know it works. As mentioned my dateDisabled
function never gets hit. I'm assuming it's ok as other methods of the calender get hit such as vm.weekEndingOpen.opened
and vm.weekEndingChanged()
.
I'm wondering whether I've forgotten to add a script file. My scripts look like the following:
<!-- Library Scripts -->
<script src="scripts/angular.js"></script>
<script src="Scripts/angular-resource.js"></script>
<script src="Scripts/angular-ui-router.js"></script>
<script src="Scripts/angular-animate.js"></script>
<script src="Scripts/jquery-1.9.1.min.js"></script>
<script src="Scripts/bootstrap.min.js"></script>
<script src="Scripts/angular-ui/ui-bootstrap-tpls.min.js"></script>
While I'm asking a datepicker question, I've noticed on other peoples plunkers that their date pickers look a little better, like the calendar has more shadows, perhaps it's the version I'm using. Also my days of the week are not showing, they're there but they don't show as I have a white background and the text is white.
My library versions are as follows:
<package id="Angular.UI.Bootstrap" version="1.3.3" targetFramework="net452" />
<package id="AngularJS.Animate" version="1.5.5" targetFramework="net452" />
<package id="AngularJS.Core" version="1.5.5" targetFramework="net452" />
<package id="AngularJS.Resource" version="1.5.5" targetFramework="net452" />
<package id="bootstrap" version="3.3.6" targetFramework="net452" />
<package id="jQuery" version="1.9.1" targetFramework="net452" />
Not sure if this is relevant but I am getting failed gets looking for icons also: - http://localhost/TimeSheet.WebSite/fonts/glyphicons-halflings-regular.woff2 - http://localhost/TimeSheet.WebSite/fonts/glyphicons-halflings-regular.woff
Any help would be much appreciated.