We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Datepicker with Today''s Date Link

Hi,

Can I put Today's date link in datepicker calander?

Example, Today is 14-Nov-2011. I click on Next button in Calander and go to January-2012 month. So I want Today's link on calander. So that there is no need to come back on 14-Nov-2011 date to select current date.

Is there any facility in Syncfusion? How can I implement this kind of functionality?

Please help me as soon as possible.

Regards,
Sonam Mehta


3 Replies

VR Varalakshmi R.S Syncfusion Team November 15, 2011 08:14 AM UTC

Hi Sonam,

Thanks for contacting syncfusion forums.

We require some more details on your requirement. Could you please explain the following queries regarding your requirement?

1.Whether you want to set the date as “January,2012” while you clicking on next button in date picker calendar.
2.Where you want to have the link for today’s date.
3.Can you provide a screen shot for demonstrating your requirement?

Kindly provide the details.

Regards,
Varalakshmi





SM Sonam Mehta November 15, 2011 10:08 AM UTC

Hi Varalakshmi,

Please find the attached image. I want today button displayed in the image. Place of today link button doesn't matter. You can put today button at any place in the calander.


Thank you for your support.

Best Regards,
Sonam



Calandar_c803bdf0.zip


VR Varalakshmi R.S Syncfusion Team November 16, 2011 04:52 PM UTC

Hi Sonam,

Thanks for the update.

We suggest you to add node for setting today’s date link and set the date in onclick function of the link node. Please refer the below code snippet to achieve this,


[View]
<%= Html.Syncfusion().DatePicker("myDatePicker").Inline(true)%>
[Script]
$(document).ready(function () {
$("#datepicker1").datepicker();
//append a link for todays date wher ever you want.
$("#myDatePicker").append("");
});

function goto() {
var currentDate = new Date();
//setDate sets currentdate to Datepicker
$("#myDatePicker").datepicker('setDate', currentDate);
}



Kindly try the above code and let us know if it helps.

Regards,
Varalakshmi




Loader.
Live Chat Icon For mobile
Up arrow icon