mardi 25 août 2015

DatePicker doesn't work with me

DatePicker doesn't work with my code:

<div class="row">
     <div class="col-sm-2">
         <label  class="control-label">Date d'ouverture</label>
     </div>

    <div class ="col-sm-6">
        @Html.TextBoxFor(model => model.ouvtik, new { @class = "datepicker form-control  col-sm-6", placeholder = "Cliquez pour sélectionner la date" })


        @Html.ValidationMessageFor(model => model.ouvtik)
    </div></div>

and also in the same view i have this :

    <script src="js/jquery-1.9.1.min.js"></script>
    <script src="js/bootstrap-datepicker.js"></script>
    <script type="text/javascript">
        $(function () { // will trigger when the document is ready
            $('.datepicker').datepicker(); //Initialise any date pickers
        });</script>

/script>
<script type="text/javascript" src="@Url.Content("~/ScriptsDatePickerReady.js")></script>

in my model I have this :

[DataType(DataType.Date)]
    public DateTime ouvtik { get; set; }

Please can anyone help me.. Thank you

Aucun commentaire:

Enregistrer un commentaire