JS Customize Height of the Date Widget

  • Last update:  2020-12-15
  • I. Overview

    1.1 Problem

    Sometimes the default style of date widget cannot satisfy certain demands. How can we change the style?

    image.png


    1.2 Solution

    We can add JS event after the date widget is initialized, to adjust its CSS style.

    js-2.gif

    Note:

    • This method also applies to the data entry date widget.

    • This method does not support mobile devices.

    II. Example

    Add a date widget in the parameter pane, and add an after initialization event. Enter the following JS:

    image (1).png

    this.btn.bind('click',function() {
        setTimeout(function(){
            $('.fr-datepicker td').css({
                height:'10px',
                'font-size':'10px',
                padding:0
            });
            $('.fr-datepicker tr').css({
                height:'10px'
            });
        },100);   
    });

    Save and preview, the effect will be like:

    js-2.gif

    III. Download template

    Attachment List


    Theme: Parameter
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy