search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Hide/Show Navigator in AngularJS(Datepicker style)?

Asked by Anonymous
8 years ago.

Here is an example of how I want to use the Navigator:
http://javascript.daypilot.org/demo/lite/calendar/datepicker.html

I'm using Navigator as follows:

http://pastebin.com/x02fh3MA

This works, but navigator is always visible and takes space on my page. How do I implement it like the example?

I tried
$scope.navigatorConfig.show();
$scope.navigatorConfig.hide();

I called above function on button clicks when navigator was fully loaded, but it didn't seem to do anything. I also tried calling .init() before .hide() without success.

Answer posted by Dan Letecky [DayPilot]
8 years ago.

You can access the DayPilot.Navigator object using $scope.navigator (because id="navigator"). The config only holds the configuration data (it has no methods).

Try this instead:

// show
$scope.navigator.show(); 

// hide
$scope.navigator.hide(); 

The date picker (DayPilot.DatePicker) doesn't have an AngularJS wrapper yet - let me check that.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.