chris0055 Posted December 4, 2020 Share Posted December 4, 2020 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 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.