datepicker.less comile error problem

The datepicker.less is not compiling due to the fact that it has no access to the variables.less and mixins.less files. This is because it is imported after the mopabootstrapbundle.less file in the base.html.twig template, and therefore is separately compiled.
I have imported the two necessary files directly into the datepicker.less file so as to avoid errors on compilation.