abitdodgy

abitdodgy

Hi everyone,

Are there libraries available to render a calendar in a Phoenix template? I’m looking for something that I can pass a number of models to and have it render a calendar template with those models based on some start_date and end_date attributes. Something like day view, week view, and month view would be nice.

I looked around, but I only found calendar and date/time related libraries. So, before I reinvent the wheel, does anyone know of something available? Of course, I can do this with a frontend lib, but I’m not sure it’s worth the hasel.

Showing Posts 1 to 5

OvermindDL1

OvermindDL1

I’ve ended up writing my own helpers, start/end dates as drop-downs, importing javascript versions, etc… (using webcomponents now), but no real pre-built one yet that I’ve seen, that mostly seems to be based on what web front-end you use, which phoenix uses bootstrap by default, which does not have a date handler like that. :slight_smile:

Qqwy

Qqwy

TypeCheck Core Team

This is very much a front-end problem.

What makes the problem of showing input fields for dates and times difficult is that there exist so many different standards for entering this information. For instance, in the EU we commonly write dd/mm/yyyy, while in america, mm/dd/yyyy is used. The international ISO8601 standard is yyyy-mm-dd which 'should resolve this. But of course, when introducing new standards…

HTML5 introduces new Date and Time input fields that make selecting dates and times more natural; for instance, on a phone it will pop up a native date/time select.(unfortunately not supported by all browser yet). There exist many JavaScript libraries that provide ‘date pickers’ or ‘period pickers’ in varying degrees of functionality and maturity.

You are definitely not the only developer looking for something like this. But as this is a very application-specific problem, and in any case is not something that is part of Phoenix’ back-end, there indeed do not exist any Hex.pm packages providing such features.

abitdodgy

abitdodgy OP

@OvermindDL1 @Qqwy I think I might not have explained myself well. I’m not looking for a date picker. I’m looking to render a calendar on the page and display events on it (as per the example link I gave). The two are similar, but not exactly the same. Although, I do agree with you: This is definitely a frontend issue. But I don’t see a problem with writing a helper that can render a calendar server side, with events, and send it back to the browser as an HTML… just like any other template?

In Rails we had several solutions. I assumed someone might have had the need and wrote something to avoid using frontend/js frameworks. But it’s unlikely given how young our ecosystem is. Thanks for chipping in, and for the helpful explanations–I appreciate them.

demem123

demem123

Hi there! I’m looking for the exact same thing – calendar template. Just wanted to ask how you did it or if you were able to find a library.

Thanks!

OvermindDL1

OvermindDL1

Eh, I’m just rendering it into a table as of recent, pretty basic but it works… ^.^;

— All posts loaded —

Where Next? Top

Trending in Questions Top

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews