Dealing with SharePoint 2007 Calendar view. We are trying some javascript via a content editor to hide the "12:00 AM" when viewing the data from a calendar view.
It's only hiding the first instance...all other strings of "12:00 AM" are still showing.
<script type="text/javascript">
var el = document.getElementById('MontlyViewDefault_CalendarView');
el.innerHTML = el.innerHTML.replace("12:00 AM", "");
</script>
Trying this too, but no luck as well:
var el = document.getElementById('MontlyViewDefault_CalendarView');
for(var i=0; i < el.length; i++) {
el[i].innerHTML = el[i].innerHTML.replace("12:00 AM","");
}
Got it with:
<script type="text/javascript">
var el = document.getElementsByTagName('a');
for(var i=0; i < el.length; i++) {
el[i].innerHTML = el[i].innerHTML.replace("12:00 AM","");
}
</script>
0 commentaires:
Enregistrer un commentaire