datepicker - beforeShowDay database
Hi!
I have a database with news (date - description - link - so on..)
I would like to change css from every date into datepicker to help users know which date has news.
Here is my code, I implemented a filter here.
- <script>
- $(function() {
- $("#datepicker").datepicker({
- changeMonth: true,
- changeYear: true,
-
- beforeShowDay: // need help here! :)
-
- onSelect: function(selectedDate) {
- var mydate;
- fecha = $("#datepicker").attr("value");
- $.ajax({
- type: "GET",
- url: "news.php",
- data: 'datepicker='+mydate,
- success: function(data) {
- $('#result').html(data);
- }
- });
- }
- });
- });
- </script>
I think I can do it with a function: beforeShowDay, but I don't know how, I am learning jquery and I was surfing the web without luck until now.
Hope someone can help me with this.
Thank u so much!