Okay
  Public Ticket #1414648
JQuery validations
Closed

Comments

  •  7
    areaticCV started the conversation

    Hello.

    I'd like to make some validations when I edit a table. For example, a Start Date must be lower than an End Date, and similar things.

    Where should I write the custom code? Could you guide me in order to begin this customization?


    Thanks in advance.

  •  472
    Isidora replied

    Hi areaticCV,
    Thank you for your purchase.

    Please note that customization questions like this one are not covered in the included support for the plugin. Included support covers help with bugs and general inquiries for the plugin features, but not writing custom code. As you're developing some custom solution if you need our assistance we can offer you our paid customization service.

    You can look about settings for the datepicker in file wdt.funcs.js around line 147 where you can implement validation. If you want to do that validation only on table when you are editing, then you have to make new element selection for tables when you edit data.


    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables

  •  7
    areaticCV replied

    Dear Milan.

    Is there any simple way to set minDate = 0 on the timepicker while editing a date field? By now, this is the only thing I need to do with calendars.

    In wdt.functs.js, I'm adding this around line 147, but it does not work:

    $(this).datetimepicker(
                {
                    format: wdtDateFormat,
                    showClear: true,
                    keepOpen: true,
                    useCurrent: false,
                    minDate: '0'
                }
            )

    Note that I have tried with minDate: = '0' and minDate: 0

    If I choose your paid customization service, what's the cost of this? What customization would be included?

    Thanks and regards.

  •  472
    Isidora replied

    Hi areaticCV,

    There are different types of bootstrap datepicker and the settings are not the same. For minDate you can use moment() like this:

    minDate:moment()

    If this not resolve your request, please fill free to explain us in more details what you want to achieve so we can see is it possible and if is to estimate the price.

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables

  •  7
    areaticCV replied

    Good morning Milan.

    It seems to work making the changes into wdt.frontend.min.js (looking for the code which contains the datepicker options. The code within this file is not easy to understand). If I make changes directly on wdt-funcs.js, when I refresh the web, nothing happens. I don't know if wdt-frontend.min.js file is auto-generated at anytime, what would delete my custom code.

    So, my question is...how do I generate wdt.frontend.min.js using the code written into wdt-funcs.js? Or I have the make them always on wdt.frontend.min.js?

  •  472
    Isidora replied

    Hi areaticCV,

    You can just turn off option Use minified wpDataTables Javascript on CUSTOM JS AND CSS tab in plugin settings.With this option turn off wdt.frontend.min.js will not be included on frontend. wdt.frontend.min.js is minified version of multiply files so my suggestion is not to changing anything there because there is a chance that something will break.

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables

  •  7
    areaticCV replied

    Dear Milan.

    If I turn off the option Use minified wpDataTables Javascript, I'm not able to select any row from the grid in the frontpage. If I turn it on, it is ok.

    You can check it into my site:

    url: https://portalcal1.campinaverde.com/portal

    user: WPDTSupport

    Pass: WPDTSupp0rt

  •  472
    Isidora replied

    Hi areaticCV,

    Can you tell me what changes do you made in our plugin? Minified files and original files are the same only difference that this one is minified, so plugin works no meter do you turn on or off option Use minified wpDataTables Javascript.

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables

  •  7
    areaticCV replied

    Dear Milan.

    I have overwrite the entire plugin and now it seems to work.

    Also, the minDate:moment() works perfectly.

    Sorry for the inconvenience. We can close the ticket.