Search code examples
htmlcalendarsquarespace

Calendar in squarespace


I am setting up a square space and I want to use the calendar they have but I want to put it in my own div instead. Does anyone know how I can get the code to manually add the calendar. If that doesn't work is there another better calendar I can embed? I was thinking of maybe trying the google calendar but I am not sure. Any help or suggestions? I just want to see a small Month calendar


Solution

  • you can use jquery plugin here called 'jquery.ui.datepicker.js'. download basic jquery and this js and use it as below. suppose your div id is 'selectDate'

    jQuery("#selectDate").datepicker({
            dateFormat: 'mm/dd/yy',
            showOn: "both",
            buttonText: "Calendar",
            minDate: currentDate,
            maxDate: lastDate,
            buttonImage:"calendar.png", // add your datepicker image
            closeText: 'X',
            showButtonPanel: true,
            buttonImageOnly: true
            });
    

    refer more details on http://jqueryui.com/datepicker/