Closed trongcong closed 6 years ago
We use ion.rangeSlider I opened an issue there: https://github.com/IonDen/ion.rangeSlider/issues/559. Try to use it in this way :
'post_related_limit' => array(
'type' => 'slider',
'value' => 4,
'properties' => array(
'step' => 1, // Set slider step. Always > 0. Could be fractional.
'values' => array( 1, 2, 3, 4, 5, 6 )
),
'label' => __( 'Post related limit', '{domain}' ),
'desc' => __( 'Post related limit (min => 1 | max => 6)', '{domain}' ),
),
Thank you @ViorelEremia
I hope they will be fixed it soon
You can use and another way:
'post_related_limit' => array(
'type' => 'slider',
'value' => 4,
'properties' => array(
'step' => 1, // Set slider step. Always > 0. Could be fractional.
'min' => 1,
'max' => 6,
//'values' => array( 1, 2, 3, 4, 5, 6 ),
'grid_snap' => 'true'
),
'label' => __( 'Post related limit', '{domain}' ),
'desc' => __( 'Post related limit (min => 1 | max => 6)', '{domain}' ),
),
I tested it and is working that is happening only for the max value of 6 i tested with bigger and lower and is working fine. I close the issue for now but I'll watch it when it's fixed in the original repository.
There seems to be a slight bug with "slider options type", the slider bar does not match the slider grid below, hope you can fix it.
Screen shot: https://prnt.sc/jkbdcz
My code: