Search code examples
sliderrangedaterangepickeralpacajs

Alpaca slider not working


I am trying to run alpaca slider but I am not able to use it in my project with property slider= true any idea how can I make it work using alpaca only. Is any specific version of alpaca needed for this to work?

I am using following code:

$(function() {
    $("#field2").alpaca({
        "data": 18,
        "options": {
            "type": "integer",
            "label": "Snow Days:",
            "helper": "Number of Snow Days in January 2011",
            "slider": true
        },
        "schema": {
            "minimum": 1,
            "maximum": 31
        }
    });
});

Solution

  • welcome to Stackoverflow.

    There are two solution for this, your code is correct but to show the slider for your component you should add jquery-ui to your page. The second solution is to add the property inputType in the options object.

    /..
    "options": {
      "id": "test",
      "type": "integer",
      "label": "Snow Days:",
      "helper": "Number of Snow Days in January 2011",
      "inputType": "range", 
    },
    /..