score:5
The easiest way is:
$("#Date").attr("placeholder", "type date");
but you can also do:
var datePicker = $("#Date").data('kendoDatePicker');
datePicker.element.attr("placeholder", "type date");
Remember that element
in DatePicker
refers to the original input
element.
Check both methods in the following code snippet.
$(document).ready(function() {
$("#Date").kendoDatePicker({
});
$("#change1").on("click", function() {
$("#Date").attr("placeholder", "type date 1");
});
$("#change2").on("click", function() {
var datePicker = $("#Date").data('kendoDatePicker');
datePicker.element.attr("placeholder", "type date 2");
});
});
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1316/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1316/styles/kendo.default.min.css">
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://cdn.kendostatic.com/2014.3.1316/js/kendo.web.min.js"></script>
<button class="k-button" id="change1">Change Method 1</button>
<button class="k-button" id="change2">Change Method 2</button>
<input id="Date" disabled="disabled"/>
Related Query
- How can I default to placeholder for date picker?
- How can I change my date picker into a year only picker?
- How reset date range for Linked Picker on eonasdan Bootstrap 3 Datepicker?
- Looking for a date picker API that can grey out days without events
- How to set the default date 10 years from today in bootstrap datepicker before clicking on the picker
- how to give a date picker which consists of an option to select for day,month and year
- How can I set a default value for ion.rangeSlider
- How can I listen for start date change in jQuery daterangepicker
- how can i validate the date for my reservation?
- How can I find out default placeholder setting
- How can I update a default value for a form field after an ajax submission (not a form reset)
- How can I change the default name "Select file" to "Select document" without using libraries?
- How can i add Next and Previous button for this slider instead of data-link="n" (remove pagination and add only Next and Prev. button)
- How can I iterate trough a jQuery object and wait for an event?
- How can I make a dialog for each of multiple divs?
- How can get the width for each swiper-slide element
- How can I not listen for mouseenter and mouseleave events while I have a set timeout running?
- How to set bootstrap-datetimepicker default displayed date to 'null'
- How can I generate unique key for each user?
- How can I use .each for div if I use .append in AJAX?
- How to disable previous dates in ui date picker
- How to set dateFormat for jQuery UI datepicker according to server date format?
- jQuery date picker to have date format as default value
- How can I use the name attribute to POST instead of ID for TinyMCE
- How can I make .replace(/./g, '_') work with exceptions for spaces?
- How can I detect when form submission is complete, for a form that does not load a page, but rather, serves up a file?
- How can I remove triangle icon (for expansion/collapse) for root node not having child node?
- How can i add dynamic validation for inputbox?? using jquery
- how to get date from jquery date picker using droppable
- jQuery how can you verify date formatted mm/dd/yyyy is not greater than current date today
- How can I make a switch for ids with a click event in jquery?
- How can I disable the select2 plugin for certain select dropdowns?
- How can I set loading image during post data processing for jquery ajax?
- How can I make a "tr" of a table visible using JavaScript for a checkbox event?
- How to change placeholder for an textarea?
- How to set default date in text box? Jquery
- How to change the default font for all jQuery Mobile texts
- Can JQUERY UI date picker show day name instead of a date?
- How can I insert the data inside a new object in for loop?
- How can I get the value of an input element inside a td for each row using jQuery
- How can I Add Time to a Date in jQuery
- How can I change format datetime to date in vue component?
- How can I put an input in the top of select tag for searching?
- How I can fix a simple html UI resolution for different different screen sizes
- How can I work around the same-origin policy to develop AJAX client code for a Google AppEngine site?
- How can I optimize my jQuery for maximum performance?
- Jquery UI : date picker. How to set date in date picker by $_GET
- How can I check all of the bindings for an element with jQuery?
- How to highlight current week in air date picker calendar
- How Can I Wait for the Result of an AJAX Request?
More Query from same tag
- How to stop scroll during the click event in Jquery
- Break out from relative parent container
- With JQuery, how can I target div elements with a specific inner text value for a "replaceWith" function
- Freeze rownum column in JQGrid
- How to do the console.log for EL expression in JS file
- MVC 3 trying to send JSON object from view to model
- AJAX POST request with GET Parameters in URL
- On load, jump to anchor within a div
- jquery show and hide on same link click
- Using jQuery appendTo() while sorting html elements
- How can I dynamically call this script that holds stuff needed to build the page and allow it to run just once?
- jQuery plugin: Validation explain this code please
- When inserting an element with the html method can I keep the original in the DOM?
- jQuery validate showerrors display name
- Store value of ajax into a javascript variable
- Not getting id of cloned div element in jQuery
- Kendo UI template loading with hidden elements
- Making Parentheses optional in regular expression
- Show dropdown values alphabetical order
- JSLint Shows so many errors but my program is working fine
- JS: styling windows.open
- Submitting a Textbox form with enter button
- Popup windows in jQuery
- replace characters in input form, but preserve the cursor position
- How to submit ASP NET MVC3 Form through ajax while overriding default behavior while maintaining client side validation
- How can I make to jQuery Libraries not effect each other?
- Modify url of an XMLHttpRequest object
- Canvas globe stops "spinning" after 12 iterations.
- Unable to read html from ajax data
- How to log in to SugarCRM using Javascript?