Adding “st, nd, rd, th” to jquery datepicker

后端 未结 8 534
臣服心动
臣服心动 2020-12-11 15:44

How can I add st,nd,rd,th to date format.. i.e. November 19th, or December 2nd, etc.

Currently, I have following code

    $( \"#datepicker\" ).datepi         


        
8条回答
  •  悲哀的现实
    2020-12-11 16:20

    Chris West has a pretty short and sweet definition for a function which generates ordinals for all integers. On this page he even shows how you can easily use his function to add ordinals to all numbers within a string.

提交回复
热议问题