2

I have the count of the total user registered on the particular date. Like the image below. How can I display them with the date? I am using multidatespickr

CustomCountOfUsers

Is there any way to do this?

UPDATE : pre-selected dates:

$('#with-altField').multiDatesPicker({
          altField: '#altField',
          minDate: 0,
          dateFormat: 'yy-mm-dd',
          addDates: ['2016-04-17','2016-04-16','2016-04-18'], // for pre-selected dates
          numberOfMonths: 3
        });
Pathik Vejani
  • 4,263
  • 8
  • 57
  • 98
  • Is it possible to select a single date with this picker (I'm not familiar with it)? If it is, you can then use pseudo-element (`before`, `after`) and add the number via `content` property and style it however you want. [Basic example](https://jsfiddle.net/0nszozko/) – Vucko Apr 14 '16 at 14:07
  • @Vucko I am not getting what you want to say – Pathik Vejani Apr 15 '16 at 04:49
  • @Vucko How can i set this in datepicker? – Pathik Vejani Apr 15 '16 at 04:53
  • Create [a jsfiddle](https://jsfiddle.net/) with your issue. – Vucko Apr 15 '16 at 07:59
  • @Vucko There is one date picker and in that, I want to display the count of users on the perticular date like in image i posted. – Pathik Vejani Apr 15 '16 at 09:10
  • @PathikVejani this will be very difficult. I suspect you get to this state by the user selecting 2 dates. If that is the case, and you want the Total Users Registered for those dates, you will have pull the users, via Ajax I suspect, into your script and add the data to your calendar manually. How is this data stored? In a database? Do you have a script that collects this data for you now based on a date range? – Twisty Apr 15 '16 at 15:53
  • @PathikVejani we will still need some amount of example code to see too. Since you're using a customer Plugin, this adds another layer of complexity. http://jsfiddle.net/ or https://plnkr.co/ are good ways to create an example that can be shared. – Twisty Apr 15 '16 at 16:09
  • Example: https://plnkr.co/edit/bCqgju7NqzCHE1vro5Yg?p=preview – Twisty Apr 15 '16 at 16:32
  • @Twisty Yes i used this date-piker you have given in example. Now how can i add count in date? – Pathik Vejani Apr 17 '16 at 07:43
  • @Twisty suppose i have 4 users registered today. then near to today's date I have to display 4 as i posted in the question. This is custom plugin that is why i am confused that how can i display all? Or is there any other calendar plugin do you know in that i can display all this count? If yes then it is also helpful for me. – Pathik Vejani Apr 17 '16 at 07:46
  • You need to provide some example data. Is it an array, json, or what? What does your code look like? – Twisty Apr 17 '16 at 15:13
  • @Twisty In the plugin, I pass the data in an array format. Do you have any other source or plugin in which I can show data like this? – Pathik Vejani Apr 18 '16 at 05:04
  • I would suggest an object. How do the items in the array align or intersect with the days of the calendar? – Twisty Apr 18 '16 at 05:37
  • @Twisty I am not getting you. Please tell me in detail.. Thank you. – Pathik Vejani Apr 18 '16 at 06:27
  • If you're array is `[7, 15, 9, 11, 2, 6]` how do I know which numbers go with which dates? – Twisty Apr 18 '16 at 07:08
  • @Twisty Yes, that is the problem. So I am finding new plugin. If you have any suggestion please let me know – Pathik Vejani Apr 18 '16 at 07:17
  • @PathikVejani I do not understand the scope of your project or what you are trying to accomplish altogether, so there is no way I can offer a recommendation. – Twisty Apr 18 '16 at 15:03
  • @Twisty Oh.. What i want are you getting? – Pathik Vejani Apr 18 '16 at 18:01
  • @PathikVejani I understand what you're looking for in the scope of this section of the project. I do not understand the scope of the entire project. If it was me, I would start with an Input for the start of the range and input for the end of the range. Once set, could then display or update a calendar that shows the range and includes the data regarding those days. – Twisty Apr 18 '16 at 18:04
  • @Twisty actually i used custom plugin to display and select multiple dates, so i don't know what to do now. – Pathik Vejani Apr 18 '16 at 18:06
  • @Twisty so now What i will do is, I will select multiple dates from those plugin and will use other plugin to display count – Pathik Vejani Apr 18 '16 at 18:08
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/109466/discussion-between-pathik-vejani-and-twisty). – Pathik Vejani Apr 18 '16 at 18:16

0 Answers0