Date field output
Author | Posts |
---|---|
September 10, 2013 at 6:22 pm 7989 | |
Tareq Hasan | Hello I would like to use the date fields selector in a custom post type to output a date range calendar. The idea is that the user would select a start date and an end date of when they would be available. I would then output this on their profile page in a nice jquery calendar. The only trouble is that all the calendars I have seen require the days months and years to be separated out and passed independently. So rather than outputting data="DD/MM/YYYY" I would like to be able to output data-days="DD" data-months="MM" data-year="YYYY". Is this possible to output the dates like this? If not can anyone recommend a decent way of displaying a date range calendar that would work with this format? Many thanks D |
September 10, 2013 at 8:25 pm 7997 | |
docandtee | Hello again Here is the code I’m using in my template:
And this is what gets output: from day: 9, from month: 12, from year: 2013 Any ideas why the second date picker’s results are wrong? Thanks D |
September 11, 2013 at 9:09 am 8003 | |
Tareq Hasan | I am not sure why is that happening, but most probably the value is getting wrong or in wrong format. Try saving the date value in Also, calling 6 times the |
September 11, 2013 at 3:59 pm 8019 | |
docandtee | Hi Tareq
|
September 11, 2013 at 4:18 pm 8020 | |
Tareq Hasan | Yeah, it looks good now. |