I have a custom calendar list with Calendar view, when adding a new list item I want to set Date field to the clicked date. Or even a date range

Is there a simple way to achieve this? I there a way to get current clicked datetime or at least displayed day view client JavaScript?

  • Any reason you can't use the actual calendar view and customize that instead of building your own? The built-in calendar already does what you're describing. – John-M Mar 23 '15 at 12:07
  • @John-M What do you mean by "use the actual calendar"? I DO use builtin Calendar list template and Calendar view, but the StartDate field is not populated with clicked date. – xumix Mar 23 '15 at 15:30
  • You said it's a "custom calendar" list, so I wanted to check if you were using the built-in calendar list template or if you created your own list and gave it a calendar view. What version of SharePoint are you using? SharePoint Online Calendar lists do automatically populate the date and time field for creating new items – John-M Mar 23 '15 at 15:34
  • @John-M yeah, I've customized my list in Visual studio - I used the same columns from the Calendar template but without some unneeded columns, the list has 106 template id. I use SP 2013 – xumix Mar 24 '15 at 8:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.