Our powerful JS Calendar component


Post by jbyvik »

Hey!

Im working with the sliderWidget in a calendar and im wanting to adjust the tooltip of the slider to show a static text instead of showing the value of the slider.

Ive configued the widget with showTooltip: false https://bryntum.com/docs/calendar/#Core/widget/Slider#config-showTooltip

And then added a tooltip prop to the object to set the tooltip text as follows:
tooltip: {html: 'myTest'},

it doesnt look like the showTooltip prop is working correctly as the slider then overwrites my html text with the value, is this a bug or can i configure this some otherway?

ran it in https://bryntum.com/examples/calendar/calendar-scheduler/
and modified the scale slider as follows :)

            scale : {
                type    : 'slider',
                text    : 'Scale',
                min     : 25,
                max     : 100,
                value   : tickWidth,
                weight  : 650,
                width   : 100,
showTooltip: false,
 tooltip: {html: 'meTest'},
                onInput : ({ value }) => calendar.modes.timeline.tickSize = value
            }

Post by Animal »

This is a bug, here is the issue for tracking: https://github.com/bryntum/support/issues/3096


Post by jbyvik »

Ok! would be great imo to add a qucik note in the apiDocs for this :)

for those finding this later on in life ^^

tooltip: false,

removes the tooltip.
If u (like me) want to add a text to the tooltip instead of value I configed the tooltip as follows:

slider: {
          cls: 'calendar-slider',
          weight: 600,
          showValue: false,
          tooltip: {
            title: 'myCoolTooltipTitle',
            cls: 'calendar-slider-tooltip',
          },
          type: 'slider',
          max: maxHour,
          min: minHour,
          value: initialZoomValue,
          onInput: (val: any) => updateZoomValue(val.value),
        },

with the following css:

.calendar-slider-tooltip .b-panel-content {
  display: none;
}

could probably leverage some better tooltip config to have a more precise class, but this works for us (we have a bit more CSS done to the tooltip)


Post by mats »

Thanks for sharing! :)


Post by bdent »

The showTooltip: false setting for the eventDragCreate also seems to have no effect. Can you provide some guidance on how to suppress it outside of the config setting as we have some feature work that depends on the 4.2.X version.


Post by mats »

Looks like a bug yes, we'll fix it! https://github.com/bryntum/support/issues/3200


Post Reply