Base solution for your next web application
Open Closed

DatePicker not working in SPA #2130


User avatar
0
avanekar02 created

my code

                        <input class="form-control date-picker" ui-jq="datepicker" type="text" value="" ng-model="vm.coursedetails.startDate" />

10 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Do you have any javascript error ? Did you added necessary javascript files to your project ?

  • User Avatar
    0
    dribnuz created

    Hi,

    Do you have any running sample for datepicker? Thanks

  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    Metronic theme has datepicker working: <a class="postlink" href="http://keenthemes.com/preview/metronic/theme/admin_4_material_design/components_date_time_pickers.html">http://keenthemes.com/preview/metronic/ ... ckers.html</a> You can download full metronic files (<a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/releases/download/v1.13.0/metronic_v4.7.zip">https://github.com/aspnetzero/aspnet-ze ... c_v4.7.zip</a>) and check source code as a sample.

  • User Avatar
    0
    dribnuz created

    Hi,

    The link can't be access. 404

    Can you grant me permission? github id: kent92g

    Thanks

  • User Avatar
    0
    ismcagdas created
    Support Team

    You are invited on github.

  • User Avatar
    0
    bilalhaidar created

    Hello, This date picker is a bootstrap one and not angular.

    Any idea if this same datepicker is available for angular 1.x?

    Thanks

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Some of the components used in Angular1 version are not angular components. So, you can use bootstrap components in metronic for angular 1.x project. Or you can search for a angular1 datepicker directive on the internet.

  • User Avatar
    0
    bilalhaidar created

    Hello Ismail, Can you please illustrate more?

    Some of the components used in Angular 1 are not angular components? So you can use bootstrap components in metronic for Angular 1

    How to use them? I know I should include files (js, css), but if a component is jquery, how can I assign ng-model to it?

    I saw something ui-jq, what is that? Does it allow me to use jQuery plugins in Angular? Is it the same thing you are referring to?

    Thanks Bilal

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Jquery plugins uses regular html inputs, so you can bind ng-model, it will work, no problem for that. ui-jq runs given jquery plugin on the element, it is a helper directive for using jquery plugins on regular html elements in angular.

    Jquery has document ready event but angualr1 does not have such an event, because of that we need ui-jq directive.

  • User Avatar
    0
    bilalhaidar created

    That's interesting! First time I know about that. Thanks :)