Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
when i select date in calendar with mouse not change in textbox .

code in asp vb
ASP.NET
<div class="input-group">
    <asp:textbox id="datePEC" runat="server" cssclass="form-control" width="250px" height="30px">
    <asp:button runat="server" id="btnSample" clientidmode="Static" style="display:none;" onclick="changerHeureDEP">
    <asp:hiddenfield runat="server" id="datesel">
</div>


What I have tried:

JavaScript
$(document).ready(function () {
               
    $('input[name="ctl00$MainContent$datePEC"]').daterangepicker({
       

        singleDatePicker: true,
        timePicker: true,
        timePicker24Hour: true,
        scrollMonth: false,
        changeDay: true,
        changeMonth: true,
        changeYear:true,

        "locale": {
            "format": "DD/MM/YYYY HH:mm",
            "separator": " - ",
            "applyLabel": "Valider",
            "cancelLabel": "Annuler",
            "fromLabel": "Du",
            "toLabel": "Au",
            "customRangeLabel": "Custom",
            "weekLabel": "S",
            "daysOfWeek": [
                "Di",
                "Lu",
                "Ma",
                "Me",
                "Je",
                "Ve",
                "Sa"
            ],
            "monthNames": [
                "Janvier",
                "Février",
                "Mars",
                "Avril",
                "Mai",
                "Juin",
                "Juillet",
                "Aout",
                "Septembre",
                "Octobre",
                "Novembre",
                "Decembre"
            ],
            "firstDay": 1
        },
        opens: 'left' 
    },
       
        function (start, end, label) {
            console.log("Une nouvelle selection a ete faite: " + start.format('DD-MM-YYYY HH:mm'));
    //        change_heure(start.format('DD-MM-YYYY HH:mm'));
            
    });
Posted
Updated 24-Sep-20 1:19am
v2
Comments
Sandeep Mewara 24-Sep-20 7:20am    
Your query is not clear and seems incomplete. Use Improve Question to update with more details.
ZurdoDev 24-Sep-20 7:34am    
You have a button and a textbox but I don't see anything that links them. Refer to documentation for daterangepicker

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900