## Custom data storage

This sample demonstrates how to implement custom data storage for the events calendar.

The sample uses the amplify.store library in order to implement local data storage.

Options used in the sample include the following:

- dataStorage - use this option in order to implement the custom data storage layer.
- visibleCalendars - array of the calendar names that need to be shown.

Note, you can use dataStorage methods in order to call server side web service, as well.

If you don't want to implement some data storage method, you can assign this method to null and the events calendar will use built-in implementation for this function, e.g.:

        	$(document).ready(function () {
        		$("#eventscalendar").wijevcal({
    			visibleCalendars: ["My", "Work"],
    			dataStorage: {
        			saveEvent: function (obj, successCallback, errorCallback) {
        				// implement your code here
        			},
        			deleteEvent: function (obj, successCallback, errorCallback) {
        				// implement your code here
        			},
        			loadEvents: function (visibleCalendars,
    											successCallback, errorCallback) {
    					// implement your code here
        			},
        			saveCalendar: null, // use built-in saveCalendar code
        			deleteCalendar: null, // use built-in deleteCalendar code
        			loadCalendars: null // use built-in loadCalendars code
        		}
        		});
        	});