Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Simon Dingley 1470 posts 3427 karma points c-trib
    Nov 22, 2019 @ 07:21
    Simon Dingley
    0

    Umbraco.Slider with decimal steps

    I've worked with Umbraco for many years but surprisingly have never had a need before now to use the slider property editor. Is there a way I can force it to accept decimals instead of only integers? I want increments of 0.1 but it doesn't seem to allow it.

  • Marc Love (uSkinned.net) 432 posts 1691 karma points
    Nov 25, 2019 @ 14:04
    Marc Love (uSkinned.net)
    1

    Hi Simon,

    This was a bug with the first release of Umbraco 8. This has now been fixed, if you upgrade.

    Cheers,

    Marc

  • Kristof 4 posts 74 karma points
    Dec 24, 2019 @ 09:17
    Kristof
    0

    This also seems to be a bug in version 7. I'm using version 7.15.2.

    It looks like the values which are returned in the response are values with a comma instead of a dot.

    part of response of previous umbraco 7 version (7.10.5)

    { "label": "Sitemap Priority", "description": null, "view": "slider", "config": { "enableRange": null, "orientation": "horizontal", "initVal1": "0.5", "initVal2": null, "minVal": "0.1", "maxVal": "1", "step": "0.1", "precision": "1", "handle": "round", "tooltip": "show", "tooltipSplit": null, "tooltipFormat": null, "tooltipPosition": null, "reversed": null, "ticks": null, "ticksPositions": null, "ticksLabels": null, "ticksSnapBounds": null }

    part of response of my current umbraco 7 version (7.15.2)

    { "label": "Sitemap priority", "description": null, "view": "slider", "config": { "enableRange": "0", "orientation": "horizontal", "initVal1": "0,5", "initVal2": null, "minVal": "0", "maxVal": "1", "step": "0,1", "precision": "1", "handle": "round", "tooltip": "show", "tooltipSplit": "0", "tooltipFormat": null, "tooltipPosition": "bottom", "reversed": "0", "ticks": "", "ticksPositions": "", "ticksLabels": null, "ticksSnapBounds": null }

    Can this be fixed? Or can I fix it myself?

  • Kristof 4 posts 74 karma points
    Dec 24, 2019 @ 12:02
    Kristof
    0

    After all this looks more like a language problem. When the user has English(US) as language and adds a new slider datatype, everything is ok. But when the user has Duch (Netherlands) as language, and adds a slider datatype, I experience the problems.

    I have the same issue with decimal datatypes.

    So a work around for this is setting the user language to English (US), adding the datatype, and then switch back the user language.

Please Sign in or register to post replies

Write your reply to:

Draft