Jump to content

Date Range Picker


chris0055

Recommended Posts

Hi,

I'm creating a custom module that allows me to set a expiry date for a product. I had been using datepicker from jQuery UI which were deprecated on 7.8.

I learned that WHMCS is using daterangepicker yet I'm not sure how exactly can I use it in my application, assuming I have the following field:

<input class="form-control date-picker-single" type="text" name="expiry" value="<?php echo $input->post('expiry', date('Y-m-d', strtotime("+7 day"))); ?>">

date-picker-single was inherited from WHMCS. In the invoice creating page, I found that WHMCS sets the adminJsVars variable yet when I tried the same setting, my custom date picker shows me Nan
 

<script>var adminJsVars = {"today":"2020-12-03","minYear":2000,"maxYear":2050,"dateRangeFormat":....</script>

Anyone can share how they implement this? Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated